Commit 81a65ce6 authored by David Reid's avatar David Reid

WASAPI: Disable auto-SRC when requesting default sample rate.

parent 1d04f03a
...@@ -7953,8 +7953,13 @@ ma_result ma_device_init_internal__wasapi(ma_context* pContext, ma_device_type d ...@@ -7953,8 +7953,13 @@ ma_result ma_device_init_internal__wasapi(ma_context* pContext, ma_device_type d
goto done; goto done;
} }
/* Override the native sample rate with the one requested by the caller. We'll use WASAPI to perform the sample rate conversion. */ /*
Override the native sample rate with the one requested by the caller, but only if we're not using the default sample rate. We'll use
WASAPI to perform the sample rate conversion.
*/
if (!pData->usingDefaultSampleRate) {
wf.Format.nSamplesPerSec = pData->sampleRateIn; wf.Format.nSamplesPerSec = pData->sampleRateIn;
}
pData->formatOut = ma_format_from_WAVEFORMATEX((WAVEFORMATEX*)&wf); pData->formatOut = ma_format_from_WAVEFORMATEX((WAVEFORMATEX*)&wf);
pData->channelsOut = wf.Format.nChannels; pData->channelsOut = wf.Format.nChannels;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment