mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
WASAPI: Disable auto-SRC when requesting default sample rate.
This commit is contained in:
+6
-1
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user