Add a config option to prevent WASAPI from using a resampler
This commit is contained in:
parent
936f7d8401
commit
2f2d3c33aa
@ -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};
|
||||
|
@ -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
|
||||
##
|
||||
|
Loading…
Reference in New Issue
Block a user