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.
This commit is contained in:
Zoran Vuckovic 2017-04-26 00:56:10 +02:00 committed by twinaphex
parent 4a715e79e3
commit c5e56b1b25

View File

@ -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: