fix(audio/windows): don't set virtual speakers higher than 24-bit mode (#3294)

Windows: don't try to set Steam speakers to 32-bit mode to avoid clobbering spatial audio settings
This commit is contained in:
Andy Grundman 2024-10-13 21:36:27 -04:00 committed by GitHub
commit 3744c43ea7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -124,9 +124,8 @@ namespace {
create_virtual_sink_waveformats() {
if constexpr (channel_count == 2) {
auto channel_mask = waveformat_mask_stereo;
// only choose 24 or 16-bit formats to avoid clobbering existing Dolby/DTS spatial audio settings
return {
create_waveformat(sample_format_e::f32, channel_count, channel_mask),
create_waveformat(sample_format_e::s32, channel_count, channel_mask),
create_waveformat(sample_format_e::s24in32, channel_count, channel_mask),
create_waveformat(sample_format_e::s24, channel_count, channel_mask),
create_waveformat(sample_format_e::s16, channel_count, channel_mask),