From de37c5b1cbdc8a8c1fd6a4e3494396fb9608fd8b Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 21 Nov 2016 19:33:31 +0100 Subject: audio: fix --audio-stream-silence with ao_wasapi Seems like wasapi will restart the HDMI stream if resume is called during playback. --- audio/out/pull.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'audio') diff --git a/audio/out/pull.c b/audio/out/pull.c index 44f6ab3355..a656de6fdd 100644 --- a/audio/out/pull.c +++ b/audio/out/pull.c @@ -101,7 +101,8 @@ static int play(struct ao *ao, void **data, int samples, int flags) int state = atomic_load(&p->state); if (!IS_PLAYING(state)) { set_state(ao, AO_STATE_PLAY); - ao->driver->resume(ao); + if (!ao->stream_silence) + ao->driver->resume(ao); } return write_samples; @@ -203,7 +204,8 @@ static void pause(struct ao *ao) static void resume(struct ao *ao) { set_state(ao, AO_STATE_PLAY); - ao->driver->resume(ao); + if (!ao->stream_silence) + ao->driver->resume(ao); } static bool get_eof(struct ao *ao) -- cgit v1.2.3