Commit 6f77af20 authored by Shen-Ta Hsieh's avatar Shen-Ta Hsieh Committed by Max Kellermann

src/output: Set fallback setting for DSD

parent 010f65a1
...@@ -113,6 +113,13 @@ inline void SetFormat(WAVEFORMATEXTENSIBLE &device_format, ...@@ -113,6 +113,13 @@ inline void SetFormat(WAVEFORMATEXTENSIBLE &device_format,
} }
} }
#ifdef ENABLE_DSD
void SetDSDFallback(AudioFormat &audio_format) noexcept {
audio_format.format = SampleFormat::FLOAT;
audio_format.sample_rate = 384000;
}
#endif
inline constexpr const unsigned int kErrorId = -1; inline constexpr const unsigned int kErrorId = -1;
} // namespace } // namespace
...@@ -360,6 +367,12 @@ void WasapiOutput::DoOpen(AudioFormat &audio_format) { ...@@ -360,6 +367,12 @@ void WasapiOutput::DoOpen(AudioFormat &audio_format) {
audio_format.channels = 8; audio_format.channels = 8;
} }
#ifdef ENABLE_DSD
if (audio_format.format == SampleFormat::DSD) {
SetDSDFallback(audio_format);
}
#endif
if (Exclusive()) { if (Exclusive()) {
FindExclusiveFormatSupported(audio_format); FindExclusiveFormatSupported(audio_format);
} else { } else {
......
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