Browse Source

Merge branch 'winrt' into 'master'

WASAPI: Fixed input device can not be opened in Exclusive mode (regression of previous commit).

Merged-on: https://assembla.com/code/portaudio/git/merge_requests/6794374
mr/new/c0d239712d9afcd4b7ad58b6e1ba97a1d789d9eb
Dmitry Kostjuchenko 1 year ago
parent
commit
b2f6d82342
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      src/hostapi/wasapi/pa_win_wasapi.c

+ 4
- 3
src/hostapi/wasapi/pa_win_wasapi.c View File

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


Loading…
Cancel
Save