src/output: Set fallback setting for DSD
This commit is contained in:
parent
010f65a1d6
commit
6f77af20d0
|
@ -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;
|
||||
|
||||
} // namespace
|
||||
|
@ -360,6 +367,12 @@ void WasapiOutput::DoOpen(AudioFormat &audio_format) {
|
|||
audio_format.channels = 8;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DSD
|
||||
if (audio_format.format == SampleFormat::DSD) {
|
||||
SetDSDFallback(audio_format);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Exclusive()) {
|
||||
FindExclusiveFormatSupported(audio_format);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue