wasapi: fixed input device can not be opened in Exclusive mode (regression of previous commit)

This commit is contained in:
dmitrykos 2018-09-10 22:55:27 +03:00
commit fe2c8e1f42

View file

@ -2973,9 +2973,10 @@ static HRESULT CreateAudioClient(PaWasapiStream *pStream, PaWasapiSubStream *pSu
&pSub->wavex.Format, &pSub->wavex.Format,
NULL); NULL);
// Check if buffer size is the one we requested in Exclusive mode, for UAC1 USB DACs WASAPI allocates internal // [Output only] Check if buffer size is the one we requested in Exclusive mode, for UAC1 USB DACs WASAPI
// buffer equal to 8 times of pSub->period that has to be corrected in order to match the requested latency // allocates internal buffer equal to 8 times of pSub->period that has to be corrected in order to match
if ((hr == S_OK) && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)) // the requested latency
if (output && (hr == S_OK) && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE))
{ {
UINT32 maxBufferSize = 0; UINT32 maxBufferSize = 0;