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.
This commit is contained in:
Max Kellermann
2017-01-11 10:06:27 +01:00
parent c143adba91
commit 2b43ceb6c6
3 changed files with 17 additions and 0 deletions

View File

@@ -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);