From efb99436370fdb60e4b816dcbaf6bb20d853627b Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Tue, 29 Dec 2015 01:13:17 -0800 Subject: ao_wasapi: make persistent enumerator local to change_notify This is no longer required by anything else --- audio/out/ao_wasapi_utils.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'audio/out/ao_wasapi_utils.c') diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index fc2f8bb7aa..c68b276120 100755 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -1101,13 +1101,7 @@ HRESULT wasapi_thread_init(struct ao *ao) MP_DBG(ao, "Init wasapi thread\n"); int64_t retry_wait = 1; retry: ; - - HRESULT hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, - &IID_IMMDeviceEnumerator, - (void **)&state->pEnumerator); - EXIT_ON_ERROR(hr); - - hr = find_device(ao); + HRESULT hr = find_device(ao); EXIT_ON_ERROR(hr); hr = load_device(ao->log, &state->pDevice, state->deviceID); @@ -1170,7 +1164,6 @@ void wasapi_thread_uninit(struct ao *ao) SAFE_RELEASE(state->pAudioClient, IAudioClient_Release(state->pAudioClient)); SAFE_RELEASE(state->pDevice, IMMDevice_Release(state->pDevice)); SAFE_RELEASE(state->deviceID, talloc_free(state->deviceID)); - SAFE_RELEASE(state->pEnumerator, IMMDeviceEnumerator_Release(state->pEnumerator)); SAFE_RELEASE(state->hTask, AvRevertMmThreadCharacteristics(state->hTask)); MP_DBG(ao, "Thread uninit done\n"); } -- cgit v1.2.3