Commit Graph

268 Commits

Author SHA1 Message Date
Max Kellermann
bc51bc2933 pcm/Normalizer: add method Reset() 2023-03-13 13:54:12 +01:00
Max Kellermann
d7f2d90fd3 pcm/Normalizer: no in-place editing, separate src/dest parameters
This eliminates the memcpy() call from NormalizeFilter::FilterPCM().
2023-03-13 13:37:49 +01:00
Max Kellermann
8ea9b89321 pcm/Normalizer: use std::span 2023-03-13 13:16:44 +01:00
Max Kellermann
e6fedcbd10 pcm/Normalizer: expose the class, convert functions to methods 2023-03-13 12:25:09 +01:00
Max Kellermann
6e5d9d4490 pcm/Normalizer: hard-code the preferences 2023-03-13 12:25:09 +01:00
Max Kellermann
2d7068a09d pcm/AudioCompress: convert to C++ 2023-03-13 12:25:01 +01:00
Max Kellermann
815b248990 */Registry: use constinit 2023-03-07 12:04:16 +01:00
Max Kellermann
42f6a0441c use [[gnu::...]] attributes 2023-03-06 16:14:15 +01:00
Max Kellermann
148aca23be use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
Max Kellermann
fa58db798b lib/fmt/RuntimeError: new library
Replacing FormatRuntimeError().
2022-11-29 14:10:34 +01:00
Max Kellermann
29eb3e9ebc mixer/Control: move some code to Lock*() methods 2022-08-18 17:34:00 +02:00
Max Kellermann
b0873fbc90 mixer/Mixer*: drop the "Mixer" prefix from source files 2022-08-18 17:21:39 +02:00
Max Kellermann
3eedcc55b9 mixer/Control: convert pointers to references 2022-08-18 16:56:06 +02:00
Max Kellermann
dd2cab1488 Merge branch 'v0.23.x' 2022-08-18 16:54:18 +02:00
Max Kellermann
e2d4654e20 filter/ReplayGain: invoke the MixerListener after volume change
This ensures that Partition::OnMixerVolumeChanged() invokes
MixerMemento::InvalidateHardwareVolume(), clearing the cached volume
level.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1526
2022-08-18 14:45:45 +02:00
Max Kellermann
b789ffd2bf Merge branch 'v0.23.x' 2022-08-08 23:46:22 +02:00
Max Kellermann
7c920ddebe filter/ffmpeg: fix FFmpeg 5.1 deprecation warnings 2022-08-08 21:34:26 +02:00
Max Kellermann
cc0def15c4 Copyright year 2022 2022-07-14 17:59:35 +02:00
Max Kellermann
67c6d111a8 filter/*: use std::span instead of ConstBuffer 2022-07-04 18:37:35 +02:00
Max Kellermann
4ce1dae673 pcm/*: use std::span instead of ConstBuffer 2022-07-04 18:11:21 +02:00
Max Kellermann
84e5da4bf0 pcm/Silence: use std::span 2022-05-20 11:15:45 +02:00
Max Kellermann
2240327286 ReplayGainInfo: move to tag/ 2021-12-06 09:28:36 +01:00
Max Kellermann
dda521a150 ReplayGain{Config,Global}: move to config/ 2021-12-03 23:08:16 +01:00
Max Kellermann
9262b24504 AudioCompress: move to pcm/ 2021-12-03 16:04:59 +01:00
Rosen Penev
d53d85bd79 remove unused includes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-23 12:33:03 -08:00
Max Kellermann
4f1e79b6b8 filter/ReplayGain: emit "mixer" event when replay gain changes volume
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1294
2021-10-19 10:03:21 +02:00
Max Kellermann
f510564d9d more [[gnu::...]] attributes 2021-10-13 12:07:05 +02:00
Max Kellermann
9ca64d5fb3 filter/Chain: eliminate, just use a chain of TwoFilters instead
The ChainFilter class is extremely complicated code, and will grow to
be even more complicated when the Filter interface gets extended.
Let's just remove it; we can easily chain many TwoFilters instead.
2021-08-26 17:45:23 +02:00
Max Kellermann
bd79354f32 filter/TwoFilters: add ChainFilters() 2021-08-26 17:42:25 +02:00
Max Kellermann
49dcac5c21 filter/TwoFilters: add class PreparedTwoFilters 2021-08-26 17:36:19 +02:00
Max Kellermann
38a4b0d8d5 filter/TwoFilters: fix include guard 2021-08-26 14:36:52 +02:00
Max Kellermann
8a29805767 release v0.22.11
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmElU1oQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnfUD/0fmlPB0ud6UdyedOp6yqbZoWvUanGFyrFX
 4eaTfSZq4qAs3JKSLqGVcseDNG4wk/VkDhXekbpFPIgCjBQpypxusQ1NowoT6gps
 NYFClU2cxBnGYHMZQeTT+4WB4VRGreZGJ42IfQbKDyrSNImKu+5CmtDvsoGezeMK
 OnL9EkNR3D7nl6uIUstuyOG6f/x1QNNVlntatslMxPYfnrZgHElwZiodqEGDh0c4
 XxBQmVyAX+AGjmwepXTQvUap2rd2x0mW7jQ7C3FFTP/eSImPsspQb4zO/TGnp3/o
 9pSIDUSlnOS78C3GIJCZB4ac7i/Gh+tSV6Y3wSJmY9s/EvqnnHwySeiJnTLG3q3G
 03Wy7r64enytU3jdgjtYb3h8fCnsQjhuhmUXtDLTF3hFeBR/EkviYQOpGqVbXpzm
 Wx+yINtHJcUr4jikxboFSQacmf2WbJbIyZ3RhsWTWANHWDqHrMzW73E850Dg3kg3
 RoeMKV3B9vFv6kolsCZR/Pq6+vFSsuDt8o+/RJqBwSKKwPP9Hm7ntlamTsJ5kA/0
 kvr5WE9RcDOU+lyTjra1OW7OInxbhr05PFNBw8GfeR9QyatUT6c3hgyhoCbZ24DV
 oPh3TwKrwtm82TMxBktGMAWb02RebEYVpPSlVrnWhpI9vlm4gHebAxANbFVWA/ur
 FxQv+PXg0w==
 =G8gT
 -----END PGP SIGNATURE-----

Merge tag 'v0.22.11'

release v0.22.11
2021-08-24 22:19:38 +02:00
Max Kellermann
8439119e24 filter/ffmpeg: support double-precision samples
Insert an "aformat" filter which converts double-precision to
single-precision.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-24 13:45:57 +02:00
Max Kellermann
b5b40d8235 filter/ffmpeg: automatically retry with "aformat"
If DetectFilterOutputFormat() fails to determine the output format,
insert an "aformat" filter which attempts to force a specific output
format.

Fixes part 2 of of https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-24 13:31:13 +02:00
Max Kellermann
ebfbb74f9e lib/ffmpeg/DetectFilterFormat: return AudioFormat::Undefined() on EAGAIN 2021-08-24 13:30:03 +02:00
Max Kellermann
7b4225aa1f lib/ffmpeg/Filter: add ParseSingleInOut()
Merge some duplicate code.
2021-08-24 13:29:08 +02:00
Max Kellermann
71a5311b06 lib/ffmpeg/Filter: eliminate class FilterContext
Since AVFilterContext are freed automatically, this wrapper class
serves no purpose.  Let's remove it.
2021-08-24 13:04:34 +02:00
Rosen Penev
40c6a214e3 unique_ptr/new to make_unique
The latter is easier to read and is the "correct" thing to do.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-20 23:54:14 -07:00
Max Kellermann
b29a43b4d7 decoder/mad, ...: more libfmt logging 2021-06-25 20:52:08 +02:00
Max Kellermann
0185d58a2b Log: add libfmt support 2021-06-24 21:14:42 +02:00
Rosen Penev
220d2bf026 clang-tidy: add explicit deleted constructors
Found with cppcoreguidelines-special-member-functions

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-30 22:47:20 -07:00
Rosen Penev
9ef1cf15a9 clang-tidy: default virtual destructors
Found with cppcoreguidelines-special-member-functions

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-30 22:46:46 -07:00
Rosen Penev
594dfe572b
clang-tidy: mark a bunch of variables constexpr
Found with cppcoreguidelines-interfaces-global-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-01-16 18:35:31 -08:00
Max Kellermann
5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann
38b41fc3fd filter/ffmpeg: detect the output sample format
Some FFmpeg filters change the sample format, and since MPD assumes
this never happens, this results in loud noise instead of music.  This
commit finally implements the TODO comment by sending one frame of
silence to the filter and checking the output frame's format.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1009
2020-11-16 09:39:34 +01:00
Max Kellermann
2da3cff1e8 filter/LoadChain: use the AutoConvertFilter
This adds support for input samples other than 16 bit to the FFmpeg
filter plugin.
2020-11-04 20:15:19 +01:00
Max Kellermann
0c965d0573 filter/AutoConvert: move the Filter class to TwoFilters.cxx 2020-11-04 20:15:19 +01:00
Max Kellermann
77c14692c9 filter/AutoConvert: eliminate AutoConvertFilter if possible
If no conversion is necessary, return the child Filter as-is.  This
allows removing all nullptr checks from AutoConvertFilter.
2020-11-04 20:15:19 +01:00
Max Kellermann
226eb26300 filter/ffmpeg: interleave the output AVFrame
If the FFmpeg filter outputs planar data, interleave it, just like the
FFmpeg decoder plugin does.
2020-11-04 20:15:19 +01:00
Max Kellermann
84f772357e filter/convert: convert_filter_new() returns std::unique_ptr 2020-11-04 16:47:11 +01:00