From c5e56b1b2574a22cf54e6ee04163fd1361663172 Mon Sep 17 00:00:00 2001 From: Zoran Vuckovic Date: Wed, 26 Apr 2017 00:56:10 +0200 Subject: [PATCH] Add workaround for "Pause when menu activated" option Audio driver start function never gets called when this option is set to off, so we start in init function for now. This solves one problem but introduces new one, WASAPI engine starts running even there is no real need for that. --- audio/drivers/wasapi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/audio/drivers/wasapi.c b/audio/drivers/wasapi.c index c2479986d2..988e585cee 100644 --- a/audio/drivers/wasapi.c +++ b/audio/drivers/wasapi.c @@ -560,6 +560,13 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency, AUDCLNT_BUFFERFLAGS_SILENT); WASAPI_HR_CHECK(hr, "IAudioRenderClient::ReleaseBuffer", goto error); + /* TODO: remove next three lines after + "Pause when menu activated" option and + fullscreen toggling are fixed */ + hr = w->client->lpVtbl->Start(w->client); + WASAPI_HR_CHECK(hr, "IAudioClient::Start", goto error); + w->running = true; + return w; error: