Commit d3f0b623 authored by Max Kellermann's avatar Max Kellermann

pcm/export: another #ifdef ENABLE_DSD fix

parent 6a53fb33
...@@ -36,7 +36,6 @@ PcmExport::Open(SampleFormat sample_format, unsigned _channels, ...@@ -36,7 +36,6 @@ PcmExport::Open(SampleFormat sample_format, unsigned _channels,
bool _dop, bool _shift8, bool _pack, bool _reverse_endian) bool _dop, bool _shift8, bool _pack, bool _reverse_endian)
{ {
assert(audio_valid_sample_format(sample_format)); assert(audio_valid_sample_format(sample_format));
assert(!_dop || audio_valid_channel_count(_channels));
channels = _channels; channels = _channels;
alsa_channel_order = _alsa_channel_order alsa_channel_order = _alsa_channel_order
...@@ -44,12 +43,14 @@ PcmExport::Open(SampleFormat sample_format, unsigned _channels, ...@@ -44,12 +43,14 @@ PcmExport::Open(SampleFormat sample_format, unsigned _channels,
: SampleFormat::UNDEFINED; : SampleFormat::UNDEFINED;
#ifdef ENABLE_DSD #ifdef ENABLE_DSD
assert(!_dop || audio_valid_channel_count(_channels));
dop = _dop && sample_format == SampleFormat::DSD; dop = _dop && sample_format == SampleFormat::DSD;
if (dop) if (dop)
/* after the conversion to DoP, the DSD /* after the conversion to DoP, the DSD
samples are stuffed inside fake 24 bit samples */ samples are stuffed inside fake 24 bit samples */
sample_format = SampleFormat::S24_P32; sample_format = SampleFormat::S24_P32;
#else #else
(void)_channels;
(void)_dop; (void)_dop;
#endif #endif
......
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