diff options
-rw-r--r-- | alc/backends/wasapi.cpp | 6 | ||||
-rw-r--r-- | alsoftrc.sample | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index f378ad6a..6bbc4439 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -57,6 +57,7 @@ #include <vector> #include "albit.h" +#include "alc/alconfig.h" #include "alnumeric.h" #include "comptr.h" #include "core/converter.h" @@ -1054,7 +1055,10 @@ HRESULT WasapiPlayback::resetProxy() CoTaskMemFree(wfx); wfx = nullptr; - mDevice->Frequency = minu(mDevice->Frequency, mFormat.Format.nSamplesPerSec); + if(!GetConfigValueBool(mDevice->DeviceName.c_str(), "wasapi", "allow-resampler", true)) + mDevice->Frequency = mFormat.Format.nSamplesPerSec; + else + mDevice->Frequency = minu(mDevice->Frequency, mFormat.Format.nSamplesPerSec); const uint32_t chancount{OutputType.Format.nChannels}; const DWORD chanmask{OutputType.dwChannelMask}; diff --git a/alsoftrc.sample b/alsoftrc.sample index d575adc3..230cb9b0 100644 --- a/alsoftrc.sample +++ b/alsoftrc.sample @@ -567,6 +567,14 @@ ## [wasapi] +## allow-resampler: +# Specifies whether to allow an extra resampler pass on the output. Enabling +# this will allow the playback device to be set to a different sample rate +# than the actual output can accept, causing the backend to apply its own +# resampling pass after OpenAL Soft mixes the sources and processes effects +# for output. +#allow-resampler = true + ## ## DirectSound backend stuff ## |