From 2b43ceb6c68e93feff830d2946abc8dc8f069421 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 11 Jan 2017 10:06:27 +0100 Subject: 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. --- test/test_pcm_export.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') 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); -- cgit v1.2.3