From 4fb1c23ca3679cc8e9840ebcab975176bd034ab4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 24 Sep 2023 19:10:06 -0700 Subject: Honor the wasapi allow-resampler option with spatial sound output --- alc/backends/wasapi.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index 516ac02c..e26af7c9 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -1793,6 +1793,10 @@ HRESULT WasapiPlayback::resetProxy() mDevice->Flags.reset(DirectEar).set(Virtualization); if(streamParams.StaticObjectTypeMask == ChannelMask_Stereo) mDevice->FmtChans = DevFmtStereo; + if(!GetConfigValueBool(mDevice->DeviceName.c_str(), "wasapi", "allow-resampler", true)) + mDevice->Frequency = OutputType.Format.nSamplesPerSec; + else + mDevice->Frequency = minu(mDevice->Frequency, OutputType.Format.nSamplesPerSec); setDefaultWFXChannelOrder(); -- cgit v1.2.3