mirror of https://github.com/mpv-player/mpv
audio: fix --audio-stream-silence with ao_wasapi
Seems like wasapi will restart the HDMI stream if resume is called during playback.
This commit is contained in:
parent
fcba41e2e4
commit
de37c5b1cb
|
@ -101,6 +101,7 @@ 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);
|
||||
if (!ao->stream_silence)
|
||||
ao->driver->resume(ao);
|
||||
}
|
||||
|
||||
|
@ -203,6 +204,7 @@ static void pause(struct ao *ao)
|
|||
static void resume(struct ao *ao)
|
||||
{
|
||||
set_state(ao, AO_STATE_PLAY);
|
||||
if (!ao->stream_silence)
|
||||
ao->driver->resume(ao);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue