Commit 5628dcf4 authored by Max Kellermann's avatar Max Kellermann

pcm/export: add #ifdef ENABLE_DSD to struct Params

parent fb4f02cd
...@@ -35,8 +35,10 @@ template<typename T> struct ConstBuffer; ...@@ -35,8 +35,10 @@ template<typename T> struct ConstBuffer;
struct PcmExport { struct PcmExport {
struct Params { struct Params {
bool alsa_channel_order = false; bool alsa_channel_order = false;
#ifdef ENABLE_DSD
bool dsd_u32 = false; bool dsd_u32 = false;
bool dop = false; bool dop = false;
#endif
bool shift8 = false; bool shift8 = false;
bool pack24 = false; bool pack24 = false;
bool reverse_endian = false; bool reverse_endian = false;
......
...@@ -125,8 +125,10 @@ class PcmExportTest : public CppUnit::TestFixture { ...@@ -125,8 +125,10 @@ class PcmExportTest : public CppUnit::TestFixture {
CPPUNIT_TEST(TestShift8); CPPUNIT_TEST(TestShift8);
CPPUNIT_TEST(TestPack24); CPPUNIT_TEST(TestPack24);
CPPUNIT_TEST(TestReverseEndian); CPPUNIT_TEST(TestReverseEndian);
#ifdef ENABLE_DSD
CPPUNIT_TEST(TestDsdU32); CPPUNIT_TEST(TestDsdU32);
CPPUNIT_TEST(TestDop); CPPUNIT_TEST(TestDop);
#endif
CPPUNIT_TEST(TestAlsaChannelOrder); CPPUNIT_TEST(TestAlsaChannelOrder);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
...@@ -134,8 +136,10 @@ public: ...@@ -134,8 +136,10 @@ public:
void TestShift8(); void TestShift8();
void TestPack24(); void TestPack24();
void TestReverseEndian(); void TestReverseEndian();
#ifdef ENABLE_DSD
void TestDsdU32(); void TestDsdU32();
void TestDop(); void TestDop();
#endif
void TestAlsaChannelOrder(); void TestAlsaChannelOrder();
}; };
......
...@@ -115,6 +115,8 @@ PcmExportTest::TestReverseEndian() ...@@ -115,6 +115,8 @@ PcmExportTest::TestReverseEndian()
CPPUNIT_ASSERT(memcmp(dest.data, expected4, dest.size) == 0); CPPUNIT_ASSERT(memcmp(dest.data, expected4, dest.size) == 0);
} }
#ifdef ENABLE_DSD
void void
PcmExportTest::TestDsdU32() PcmExportTest::TestDsdU32()
{ {
...@@ -165,6 +167,8 @@ PcmExportTest::TestDop() ...@@ -165,6 +167,8 @@ PcmExportTest::TestDop()
CPPUNIT_ASSERT(memcmp(dest.data, expected, dest.size) == 0); CPPUNIT_ASSERT(memcmp(dest.data, expected, dest.size) == 0);
} }
#endif
template<SampleFormat F, class Traits=SampleTraits<F>> template<SampleFormat F, class Traits=SampleTraits<F>>
static void static void
TestAlsaChannelOrder51() TestAlsaChannelOrder51()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment