mpd/src/filter
Max Kellermann af99f9fc90 pcm/Volume: convert S16 to S24 to preserve quality and reduce noise
Applying software volume to S16 samples means several bits of
precision are lost; at 25% volume, two bits are lost.  Additionally,
dithering adds some noise.

The problem gets worse when you apply the software volume code twice:
for the software mixer volume, and again for the replay gain.  This
loses some more precision and adds even more dithering noise, which
can become audible (see
https://github.com/MusicPlayerDaemon/MPD/issues/542).

By converting everything to 24 bit, we need to shift only two bits to
the right instead of ten, losing nearly no precision, and dithering is
not needed.  Even if the output device is unable to play S24 directly,
we can convert back to S16 with only one stage of dithering.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/542
2019-07-30 20:03:37 +02:00
..
plugins pcm/Volume: convert S16 to S24 to preserve quality and reduce noise 2019-07-30 20:03:37 +02:00
Factory.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
Factory.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00
Filter.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
Filter.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00
FilterPlugin.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00
FilterRegistry.cxx filter/ffmpeg: new filter plugin 2019-03-18 18:56:06 +01:00
FilterRegistry.hxx filter/registry: move extern lines to plugin headers 2019-03-12 12:26:12 +01:00
LoadChain.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
LoadChain.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00
LoadOne.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
LoadOne.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00
meson.build build with Meson instead of autotools 2018-10-14 23:41:38 +02:00
NullFilter.hxx filter/plugins/null: move code to src/filter/NullFilter.hxx 2019-03-18 13:48:24 +01:00
Observer.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
Observer.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00
Prepared.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00