Browse Source

Merge branch 'winrt' into 'master'

WASAPI: Fixed crash on NULL.

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

+ 1
- 1
src/hostapi/wasapi/pa_win_wasapi.c View File

@@ -2462,7 +2462,7 @@ static PaError GetClosestFormat(IAudioClient *client, double sampleRate, const P
WAVEFORMATEX *sharedClosestMatch = NULL;
HRESULT hr = !S_OK;
PaStreamParameters params = (*_params);
const BOOL explicitFormat = ((streamInfo->flags & paWinWasapiExplicitSampleFormat) == paWinWasapiExplicitSampleFormat);
const BOOL explicitFormat = (streamInfo != NULL) && ((streamInfo->flags & paWinWasapiExplicitSampleFormat) == paWinWasapiExplicitSampleFormat);
(void)output;

/* It was not noticed that 24-bit Input producing no output while device accepts this format.

Loading…
Cancel
Save