diff options
Diffstat (limited to 'src/cubeb_wasapi.cpp')
-rw-r--r-- | src/cubeb_wasapi.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cubeb_wasapi.cpp b/src/cubeb_wasapi.cpp index 7fe0778..ad3a110 100644 --- a/src/cubeb_wasapi.cpp +++ b/src/cubeb_wasapi.cpp @@ -1469,6 +1469,15 @@ static unsigned int __stdcall wasapi_stream_render_loop(LPVOID stream) } } + // Stop audio clients since this thread will no longer service + // the events. + if (stm->output_client) { + stm->output_client->Stop(); + } + if (stm->input_client) { + stm->input_client->Stop(); + } + if (mmcss_handle) { AvRevertMmThreadCharacteristics(mmcss_handle); } |