added userFramesPerBuffer parameter to SelectHostBufferSize in preparation for improving asio buffer size handling

This commit is contained in:
rossb 2011-05-10 15:58:15 +00:00
commit d03dd9e357

View file

@ -1629,7 +1629,7 @@ static void ZeroOutputBuffers( PaAsioStream *stream, long index )
} }
static unsigned long SelectHostBufferSize( unsigned long suggestedLatencyFrames, static unsigned long SelectHostBufferSize( unsigned long suggestedLatencyFrames, unsigned long userFramesPerBuffer,
PaAsioDriverInfo *driverInfo ) PaAsioDriverInfo *driverInfo )
{ {
unsigned long result; unsigned long result;
@ -2095,15 +2095,15 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
if( usingBlockingIo ) if( usingBlockingIo )
{ {
/** @todo REVIEW selection of host buffer size for blocking i/o */ /** @todo REVIEW selection of host buffer size for blocking i/o */
/* Use default host latency for blocking i/o. */
framesPerHostBuffer = SelectHostBufferSize( 0, driverInfo ); framesPerHostBuffer = SelectHostBufferSize( 0, framesPerBuffer, driverInfo );
} }
else /* Using callback interface... */ else /* Using callback interface... */
{ {
framesPerHostBuffer = SelectHostBufferSize( framesPerHostBuffer = SelectHostBufferSize(
(( suggestedInputLatencyFrames > suggestedOutputLatencyFrames ) (( suggestedInputLatencyFrames > suggestedOutputLatencyFrames )
? suggestedInputLatencyFrames : suggestedOutputLatencyFrames), ? suggestedInputLatencyFrames : suggestedOutputLatencyFrames), framesPerBuffer,
driverInfo ); driverInfo );
} }