pcm/export: add #ifdef ENABLE_DSD to struct Params

This commit is contained in:
Max Kellermann 2016-02-27 08:02:01 +01:00
parent fb4f02cd38
commit 5628dcf47e
3 changed files with 10 additions and 0 deletions

View File

@ -35,8 +35,10 @@ template<typename T> 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;

View File

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

View File

@ -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<SampleFormat F, class Traits=SampleTraits<F>>
static void
TestAlsaChannelOrder51()