diff options
author | Max Kellermann <max@musicpd.org> | 2017-01-11 10:06:27 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-01-11 10:14:41 +0100 |
commit | 2b43ceb6c68e93feff830d2946abc8dc8f069421 (patch) | |
tree | 253fc790a1741e08d3be653204003217fa39dbe8 /test | |
parent | c143adba914b2ffad4e773531d301fdc687622c9 (diff) |
pcm/Export: DSD_U32 quarters the sample rate
DSD_U32 packs four bytes instead of one large "sample", thus the
sample rate is one quarter of the input sample rate. This fixes a
rather critical DSD_U32 playback problem.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_pcm_export.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_pcm_export.cxx b/test/test_pcm_export.cxx index 2c2e32013..5dded1367 100644 --- a/test/test_pcm_export.cxx +++ b/test/test_pcm_export.cxx @@ -146,6 +146,9 @@ PcmExportTest::TestDsdU32() PcmExport::Params params; params.dsd_u32 = true; + CPPUNIT_ASSERT_EQUAL(params.CalcOutputSampleRate(705600u), 176400u); + CPPUNIT_ASSERT_EQUAL(params.CalcInputSampleRate(176400u), 705600u); + PcmExport e; e.Open(SampleFormat::DSD, 2, params); |