From c52833bf16c9f4cc2bb676d13df86ef6be30f434 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sun, 22 Feb 2015 18:27:58 -0800 Subject: ao/wasapi: move resume to audio thread This echanges the two events hForceFeed/hFeedDone for hResume. This like the last commit makes things more deterministic. Importantly, the forcefeed is only done if there is not already a full buffer yet to be played by the device. This should fix some of the problems with exclusive mode. This commit also removes the necessity to have a proxy to the AudioClient object in the main thread. fixes #1529 --- audio/out/ao_wasapi_utils.c | 4 ---- 1 file changed, 4 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 08fdd14930..13bc0fac6d 100755 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -958,7 +958,6 @@ HRESULT wasapi_setup_proxies(struct wasapi_state *state) { EXIT_ON_ERROR(hr); \ } while (0) - UNMARSHAL(IID_IAudioClient, state->pAudioClientProxy, state->sAudioClient); UNMARSHAL(IID_ISimpleAudioVolume, state->pAudioVolumeProxy, state->sAudioVolume); UNMARSHAL(IID_IAudioEndpointVolume, state->pEndpointVolumeProxy, state->sEndpointVolume); UNMARSHAL(IID_IAudioSessionControl, state->pSessionControlProxy, state->sSessionControl); @@ -973,7 +972,6 @@ exit_label: } void wasapi_release_proxies(wasapi_state *state) { - SAFE_RELEASE(state->pAudioClientProxy, IUnknown_Release(state->pAudioClientProxy)); SAFE_RELEASE(state->pAudioVolumeProxy, IUnknown_Release(state->pAudioVolumeProxy)); SAFE_RELEASE(state->pEndpointVolumeProxy, IUnknown_Release(state->pEndpointVolumeProxy)); SAFE_RELEASE(state->pSessionControlProxy, IUnknown_Release(state->pSessionControlProxy)); @@ -991,7 +989,6 @@ static HRESULT create_proxies(struct wasapi_state *state) { EXIT_ON_ERROR(hr); \ } while (0) - MARSHAL(IID_IAudioClient, state->sAudioClient, state->pAudioClient); MARSHAL(IID_ISimpleAudioVolume, state->sAudioVolume, state->pAudioVolume); MARSHAL(IID_IAudioEndpointVolume, state->sEndpointVolume, state->pEndpointVolume); MARSHAL(IID_IAudioSessionControl, state->sSessionControl, state->pSessionControl); @@ -1004,7 +1001,6 @@ exit_label: } static void destroy_proxies(struct wasapi_state *state) { - SAFE_RELEASE(state->sAudioClient, IUnknown_Release(state->sAudioClient)); SAFE_RELEASE(state->sAudioVolume, IUnknown_Release(state->sAudioVolume)); SAFE_RELEASE(state->sEndpointVolume, IUnknown_Release(state->sEndpointVolume)); SAFE_RELEASE(state->sSessionControl, IUnknown_Release(state->sSessionControl)); -- cgit v1.2.3