Commit 40141191 authored by David Reid's avatar David Reid

WASAPI: Fix a bug with stopping and restarting devices.

parent c95710c6
......@@ -5868,6 +5868,12 @@ mal_result mal_device__stop_backend__wasapi(mal_device* pDevice)
return mal_post_error(pDevice, "[WASAPI] Failed to stop internal device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
// The client needs to be reset or else we won't be able to resume it again.
hr = mal_IAudioClient_Reset((mal_IAudioClient*)pDevice->wasapi.pAudioClient);
if (FAILED(hr)) {
return mal_post_error(pDevice, "[WASAPI] Failed to reset internal device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
return MAL_SUCCESS;
}
......
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