Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ASIO messages #519

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review notes in ValidateAsioSpecificStreamInfo
  • Loading branch information
EvanBalster committed Mar 2, 2024
commit d0bb322f091d7783c5ade5aba640c7c78254aca9
16 changes: 7 additions & 9 deletions src/hostapi/asio/pa_asio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1892,24 +1892,22 @@ static PaError ValidateAsioSpecificStreamInfo(
break;

default:
/* Newer versions of the struct must be larger. */
/* Newer versions of the struct must not be smaller. */
if( streamInfo->size < sizeof( PaAsioStreamInfo ) )
return paIncompatibleHostApiSpecificStreamInfo;
break;
}

if( streamInfo->flags & paAsioUseChannelSelectors )
EvanBalster marked this conversation as resolved.
Show resolved Hide resolved
{
*channelSelectors = streamInfo->channelSelectors;

if( !(*channelSelectors) )
return paIncompatibleHostApiSpecificStreamInfo;
if( !(*channelSelectors) )
return paIncompatibleHostApiSpecificStreamInfo;

for( int i=0; i < streamParameters->channelCount; ++i ){
if( (*channelSelectors)[i] < 0
|| (*channelSelectors)[i] >= deviceChannelCount ){
return paInvalidChannelCount;
}
for( int i=0; i < streamParameters->channelCount; ++i ){
if( (*channelSelectors)[i] < 0
|| (*channelSelectors)[i] >= deviceChannelCount ){
return paInvalidChannelCount;
}
}

Expand Down