mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Minor adjustment to a calculation.
This commit is contained in:
+1
-1
@@ -23169,7 +23169,7 @@ static ma_result ma_device_stop__wasapi_nolock(ma_device* pDevice)
|
|||||||
*/
|
*/
|
||||||
if (ma_atomic_bool32_get(&pDevice->wasapi.isStartedPlayback)) {
|
if (ma_atomic_bool32_get(&pDevice->wasapi.isStartedPlayback)) {
|
||||||
/* We need to make sure we put a timeout here or else we'll risk getting stuck in a deadlock in some cases. */
|
/* We need to make sure we put a timeout here or else we'll risk getting stuck in a deadlock in some cases. */
|
||||||
DWORD waitTime = pDevice->wasapi.actualBufferSizeInFramesPlayback / (pDevice->playback.internalSampleRate / 1000);
|
DWORD waitTime = (pDevice->wasapi.actualBufferSizeInFramesPlayback * 1000) / pDevice->playback.internalSampleRate;
|
||||||
|
|
||||||
if (pDevice->playback.shareMode == ma_share_mode_exclusive) {
|
if (pDevice->playback.shareMode == ma_share_mode_exclusive) {
|
||||||
WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, waitTime);
|
WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, waitTime);
|
||||||
|
|||||||
Reference in New Issue
Block a user