summaryrefslogtreecommitdiff
path: root/test/test_pcm_volume.cxx
AgeCommit message (Collapse)Author
2021-04-28test/test_mixramp: workaround for -Wdouble-promotionMax Kellermann
2021-01-01copyright year 2021Max Kellermann
2020-02-01test/test_pcm_*: use `using` instead of `typedef`Max Kellermann
2020-01-18copyright year 2020Max Kellermann
2019-07-30pcm/Volume: convert S16 to S24 to preserve quality and reduce noiseMax Kellermann
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-05pcm/Volume: Open() returns output sample formatMax Kellermann
Prepare for a new mode which may convert to a different sample format when applying volume, to reduce dithering.
2019-06-17Copyright year 2019Max Kellermann
2018-11-19check.h: remove obsolete headerMax Kellermann
Since we switched from autotools to Meson in commit 94592c14062d5afc9482d11baa401648082022c0, we don't need to include `config.h` early to properly enable large file support. Meson passes the required macros on the compiler command line instead of defining them in `config.h`. This means we can include `config.h` at any time, whenever we want to check its macros, and there are no ordering constraints.
2018-10-31*: copyright year 2018Max Kellermann
2018-10-16test: use GTest instead of cppunitMax Kellermann
2017-01-03update copyright yearMax Kellermann
2016-09-09pcm/Convert: migrate from class Error to C++ exceptionsMax Kellermann
2016-02-26update copyright year to 2016Max Kellermann
2015-01-01Copyright year 2015Max Kellermann
2014-03-15test/test_pcm: replace 256 with prime numberMax Kellermann
Use some odd number that will expose problems with remaining samples after optimized vector operations.
2014-03-01util/{Const,Writable}Buffer: add operator[]Max Kellermann
2014-01-13copyright year 2014Max Kellermann
2013-12-28pcm/Volume: improved ditheringMax Kellermann
Instead of just adding a rectangular random value before shifting back to the normal scale, use the existing PcmDither library.
2013-12-23pcm/Volume: convert to classMax Kellermann
Prepare for adding state.
2013-12-23pcm/PcmVolume: rename to Volume.cxxMax Kellermann
2013-10-19test/test_pcm: use C++11 random instead of GLibMax Kellermann
2013-10-16test: use the CPPUNIT framework for unit testsMax Kellermann
2013-08-03audio_format: convert to C++Max Kellermann
2013-04-09pcm_*: move to src/pcm/Max Kellermann
2013-01-31test/test_pcm: merge source buffer generatorMax Kellermann
2013-01-31pcm_*: convert to C++Max Kellermann
2013-01-31test/test_pcm: convert to C++Max Kellermann