summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi.h
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2015-02-22 18:47:50 -0800
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-02-25 10:59:19 +0900
commit774e8183717d8ca993d4be342389dc3a0f49c1b4 (patch)
treec06ff54b48465d6361cbb1f4ee83823776227013 /audio/out/ao_wasapi.h
parent352c00fd086089021b44e475d66b81fb1dd27619 (diff)
downloadmpv-774e8183717d8ca993d4be342389dc3a0f49c1b4.tar.bz2
mpv-774e8183717d8ca993d4be342389dc3a0f49c1b4.tar.xz
ao_wasapi: move reset into audio thread
This makes things a bit more deterministic. It ensures that the audio thread isn't doing anything between IAudioClient_Stop(), IAudioClient_Reset() and setting the sample_count to 0. Buffer overfilling on resume is still a problem in exclusive mode (see next commit). (cherry picked from commit 446fd5a43a56f15d7ecec5fb65544adeee0be72f)
Diffstat (limited to 'audio/out/ao_wasapi.h')
-rwxr-xr-xaudio/out/ao_wasapi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h
index 895497bffb..4923229a4b 100755
--- a/audio/out/ao_wasapi.h
+++ b/audio/out/ao_wasapi.h
@@ -74,6 +74,7 @@ typedef struct wasapi_state {
HANDLE hFeed; /* wasapi event */
HANDLE hForceFeed; /* forces writing a buffer (e.g. before audio_resume) */
HANDLE hFeedDone; /* set only after a hForceFeed */
+ HANDLE hReset; /* signal audio thread to reset the stream */
HANDLE hTask; /* AV thread */
DWORD taskIndex; /* AV task ID */
WAVEFORMATEXTENSIBLE format;