diff options
Diffstat (limited to 'audio/out/ao_wasapi_utils.c')
-rw-r--r-- | audio/out/ao_wasapi_utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index 53ab1fe036..3aec5ac29a 100644 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -663,11 +663,13 @@ static HRESULT fix_format(struct ao *ao, bool align_hack) init_session_display(state); init_volume_control(state); +#if !HAVE_UWP state->hTask = AvSetMmThreadCharacteristics(L"Pro Audio", &(DWORD){0}); if (!state->hTask) { MP_WARN(state, "Failed to set AV thread to Pro Audio: %s\n", mp_LastError_to_str()); } +#endif return S_OK; exit_label: @@ -980,6 +982,8 @@ void wasapi_thread_uninit(struct ao *ao) SAFE_RELEASE(state->pSessionControl); SAFE_RELEASE(state->pAudioClient); SAFE_RELEASE(state->pDevice); +#if !HAVE_UWP SAFE_DESTROY(state->hTask, AvRevertMmThreadCharacteristics(state->hTask)); +#endif MP_DBG(ao, "Thread uninit done\n"); } |