From 5628dcf47e2d15727cbc9a1f8c9d5b19b69e590d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 27 Feb 2016 08:02:01 +0100 Subject: [PATCH] pcm/export: add #ifdef ENABLE_DSD to struct Params --- src/pcm/PcmExport.hxx | 2 ++ test/test_pcm_all.hxx | 4 ++++ test/test_pcm_export.cxx | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/src/pcm/PcmExport.hxx b/src/pcm/PcmExport.hxx index b33d7b800..dd34e441a 100644 --- a/src/pcm/PcmExport.hxx +++ b/src/pcm/PcmExport.hxx @@ -35,8 +35,10 @@ template struct ConstBuffer; struct PcmExport { struct Params { bool alsa_channel_order = false; +#ifdef ENABLE_DSD bool dsd_u32 = false; bool dop = false; +#endif bool shift8 = false; bool pack24 = false; bool reverse_endian = false; diff --git a/test/test_pcm_all.hxx b/test/test_pcm_all.hxx index c59d2e1f2..393e455be 100644 --- a/test/test_pcm_all.hxx +++ b/test/test_pcm_all.hxx @@ -125,8 +125,10 @@ class PcmExportTest : public CppUnit::TestFixture { CPPUNIT_TEST(TestShift8); CPPUNIT_TEST(TestPack24); CPPUNIT_TEST(TestReverseEndian); +#ifdef ENABLE_DSD CPPUNIT_TEST(TestDsdU32); CPPUNIT_TEST(TestDop); +#endif CPPUNIT_TEST(TestAlsaChannelOrder); CPPUNIT_TEST_SUITE_END(); @@ -134,8 +136,10 @@ public: void TestShift8(); void TestPack24(); void TestReverseEndian(); +#ifdef ENABLE_DSD void TestDsdU32(); void TestDop(); +#endif void TestAlsaChannelOrder(); }; diff --git a/test/test_pcm_export.cxx b/test/test_pcm_export.cxx index bd4deb42a..fca580774 100644 --- a/test/test_pcm_export.cxx +++ b/test/test_pcm_export.cxx @@ -115,6 +115,8 @@ PcmExportTest::TestReverseEndian() CPPUNIT_ASSERT(memcmp(dest.data, expected4, dest.size) == 0); } +#ifdef ENABLE_DSD + void PcmExportTest::TestDsdU32() { @@ -165,6 +167,8 @@ PcmExportTest::TestDop() CPPUNIT_ASSERT(memcmp(dest.data, expected, dest.size) == 0); } +#endif + template> static void TestAlsaChannelOrder51()