output/pipewire: restore SampleFormat::DSD after ToPipeWireAudioFormat() call

This commit is contained in:
Max Kellermann 2021-10-21 21:15:10 +02:00
parent 15b67f20e5
commit 6467502b9d

View File

@ -487,6 +487,14 @@ PipeWireOutput::Open(AudioFormat &audio_format)
auto raw = ToPipeWireAudioFormat(audio_format);
#if defined(ENABLE_DSD) && defined(SPA_AUDIO_DSD_FLAG_NONE)
if (use_dsd)
/* restore the DSD format which was overwritten by
ToPipeWireAudioFormat(), because DSD is a special
case in PipeWire */
audio_format.format = SampleFormat::DSD;
#endif
frame_size = audio_format.GetFrameSize();
sample_format = audio_format.format;
channels = audio_format.channels;