From: dmitrykos Date: Mon, 10 Sep 2018 19:55:27 +0000 (+0300) Subject: wasapi: fixed input device can not be opened in Exclusive mode (regression of previou... X-Git-Tag: v19.7.0~135^2 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=fe2c8e1f421df4f868d27b587eb90d1b74578fc5;p=portaudio wasapi: fixed input device can not be opened in Exclusive mode (regression of previous commit) --- diff --git a/src/hostapi/wasapi/pa_win_wasapi.c b/src/hostapi/wasapi/pa_win_wasapi.c index fd57fd6..36abc07 100644 --- a/src/hostapi/wasapi/pa_win_wasapi.c +++ b/src/hostapi/wasapi/pa_win_wasapi.c @@ -2973,9 +2973,10 @@ static HRESULT CreateAudioClient(PaWasapiStream *pStream, PaWasapiSubStream *pSu &pSub->wavex.Format, NULL); - // Check if buffer size is the one we requested in Exclusive mode, for UAC1 USB DACs WASAPI allocates internal - // buffer equal to 8 times of pSub->period that has to be corrected in order to match the requested latency - if ((hr == S_OK) && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)) + // [Output only] Check if buffer size is the one we requested in Exclusive mode, for UAC1 USB DACs WASAPI + // allocates internal buffer equal to 8 times of pSub->period that has to be corrected in order to match + // the requested latency + if (output && (hr == S_OK) && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)) { UINT32 maxBufferSize = 0;