mpd/test
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
..
net test/net/TestIPv4Address: make literal unsigned to work around -Wsign-compare 2019-01-21 14:39:24 +01:00
ConfigGlue.hxx test/ConfigGlue: merge duplicate code from various debug programs 2019-02-05 21:56:20 +01:00
ContainerScan.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
dump_playlist.cxx playlist/Registry: add RAII class 2019-02-05 23:03:29 +01:00
dump_rva2.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
dump_text_file.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
DumpDatabase.cxx db/DatabaseListener: add noexcept 2019-04-24 14:57:30 +02:00
DumpDecoderClient.cxx decoder/Bridge: add noexcept 2019-07-05 08:57:51 +02:00
DumpDecoderClient.hxx decoder/Bridge: add noexcept 2019-07-05 08:57:51 +02:00
MakeTag.hxx test/MakeTag: add noexcept 2019-03-16 13:23:02 +01:00
meson.build archive/Lookup: move to fs/LookupFile.cxx 2019-06-15 14:26:26 +02:00
NullMixerListener.hxx mixer/Listener: add noexcept 2019-05-31 14:09:47 +02:00
ParseSongFilter.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
read_conf.cxx include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
read_mixer.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
read_tags.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
ReadApeTags.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
run_avahi.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
run_convert.cxx pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
run_decoder.cxx test/run_decoder: catch StopDecoder 2019-07-12 17:49:12 +02:00
run_encoder.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
run_filter.cxx test/run_filter: check for partial writes 2019-03-25 08:59:34 +01:00
run_gunzip.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
run_gzip.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
run_inotify.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
run_input.cxx event/Call, ...: use wait() with predicate 2019-05-07 20:01:45 +02:00
run_neighbor_explorer.cxx test/ConfigGlue: merge duplicate code from various debug programs 2019-02-05 21:56:20 +01:00
run_normalize.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
run_output.cxx pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
run_resolver.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
run_storage.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
RunChromaprint.cxx Merge branch 'v0.21.x' 2019-07-29 11:32:00 +02:00
ShutdownHandler.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
ShutdownHandler.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00
software_volume.cxx pcm/Volume: convert S16 to S24 to preserve quality and reduce noise 2019-07-30 20:03:37 +02:00
test_archive_bzip2.sh build with Meson instead of autotools 2018-10-14 23:41:38 +02:00
test_archive_iso9660.sh build with Meson instead of autotools 2018-10-14 23:41:38 +02:00
test_archive_zzip.sh build with Meson instead of autotools 2018-10-14 23:41:38 +02:00
test_byte_reverse.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
test_icy_parser.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
test_mixramp.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
test_pcm_channels.cxx pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
test_pcm_dither.cxx pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
test_pcm_export.cxx pcm/Export: add GetSilence() 2019-06-26 16:04:46 +02:00
test_pcm_format.cxx pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
test_pcm_interleave.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
test_pcm_mix.cxx pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
test_pcm_pack.cxx pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
test_pcm_util.hxx Copyright year 2019 2019-06-17 11:17:30 +02:00
test_pcm_volume.cxx pcm/Volume: convert S16 to S24 to preserve quality and reduce noise 2019-07-30 20:03:37 +02:00
test_protocol.cxx include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
test_queue_priority.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
test_translate_song.cxx Merge branch 'v0.21.x' 2019-07-29 11:32:00 +02:00
test_vorbis_encoder.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
TestAudioFormat.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
TestCircularBuffer.cxx test/TestCircularBuffer: add constexpr to fix -Wvla 2019-06-06 12:40:32 +02:00
TestDivideString.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TestFs.cxx test: use GTest instead of cppunit 2018-10-16 21:26:04 +02:00
TestIcu.cxx test: use GTest instead of cppunit 2018-10-16 21:26:04 +02:00
TestLookupFile.cxx archive/Lookup: move to fs/LookupFile.cxx 2019-06-15 14:26:26 +02:00
TestMimeType.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TestRewindInputStream.cxx input/InputStream: make IsEOF() and IsAvailable() const 2019-05-29 13:31:54 +02:00
TestSplitString.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TestTagSongFilter.cxx test/TestSongFilter: unit test for song filters 2019-03-16 13:23:02 +01:00
TestUriUtil.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
visit_archive.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00
WriteFile.cxx Copyright year 2019 2019-06-17 11:17:30 +02:00