wasapi: Fix paInvalidSampleRate (and any other) error code is replaced with paInvalidDevice if audio client failed to be created due to some reason.
This commit is contained in:
parent
697fcddce5
commit
dcc2f7fa48
1 changed files with 6 additions and 6 deletions
|
|
@ -3705,9 +3705,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
stream->in.params.wow64_workaround = paWasapi->useWOW64Workaround;
|
stream->in.params.wow64_workaround = paWasapi->useWOW64Workaround;
|
||||||
|
|
||||||
// Create and activate audio client
|
// Create and activate audio client
|
||||||
if (FAILED(hr = ActivateAudioClientInput(stream)))
|
if ((result = ActivateAudioClientInput(stream)) != paNoError)
|
||||||
{
|
{
|
||||||
LogPaError(result = paInvalidDevice);
|
LogPaError(result);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3839,9 +3839,9 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
||||||
stream->out.params.wow64_workaround = paWasapi->useWOW64Workaround;
|
stream->out.params.wow64_workaround = paWasapi->useWOW64Workaround;
|
||||||
|
|
||||||
// Create and activate audio client
|
// Create and activate audio client
|
||||||
if (FAILED(hr = ActivateAudioClientOutput(stream)))
|
if ((result = ActivateAudioClientOutput(stream)) != paNoError)
|
||||||
{
|
{
|
||||||
LogPaError(result = paInvalidDevice);
|
LogPaError(result);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue