summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi_utils.c
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2015-02-22 18:27:58 -0800
committerKevin Mitchell <kevmitch@gmail.com>2015-02-23 14:02:08 -0800
commitc52833bf16c9f4cc2bb676d13df86ef6be30f434 (patch)
treead0662873936d73b5cd32b5e4e706c6d69c88d77 /audio/out/ao_wasapi_utils.c
parent446fd5a43a56f15d7ecec5fb65544adeee0be72f (diff)
downloadmpv-c52833bf16c9f4cc2bb676d13df86ef6be30f434.tar.bz2
mpv-c52833bf16c9f4cc2bb676d13df86ef6be30f434.tar.xz
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
Diffstat (limited to 'audio/out/ao_wasapi_utils.c')
-rwxr-xr-xaudio/out/ao_wasapi_utils.c4
1 files changed, 0 insertions, 4 deletions
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));