Added patest_write_sine_nonint to Makefile.
Check for paNonInterleaved on Mac and return paSampleFormatNotSupported. Fix pa_minlat.c. Linux was complaining about not checking fgets return value.
This commit is contained in:
parent
7d8d647cfa
commit
7aad01a1d3
5 changed files with 49 additions and 25 deletions
|
|
@ -1340,13 +1340,19 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
(float) sampleRate,
|
||||
framesPerBuffer ));
|
||||
VDBUG( ("Opening Stream.\n") );
|
||||
|
||||
|
||||
/*These first few bits of code are from paSkeleton with few modifications.*/
|
||||
if( inputParameters )
|
||||
{
|
||||
inputChannelCount = inputParameters->channelCount;
|
||||
inputSampleFormat = inputParameters->sampleFormat;
|
||||
|
||||
/* @todo Blocking read/write on Mac is not yet supported. */
|
||||
if( inputSampleFormat & paNonInterleaved )
|
||||
{
|
||||
return paSampleFormatNotSupported;
|
||||
}
|
||||
|
||||
/* unless alternate device specification is supported, reject the use of
|
||||
paUseHostApiSpecificDeviceSpecification */
|
||||
|
||||
|
|
@ -1371,6 +1377,12 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
|
|||
outputChannelCount = outputParameters->channelCount;
|
||||
outputSampleFormat = outputParameters->sampleFormat;
|
||||
|
||||
/* @todo Blocking read/write on Mac is not yet supported. */
|
||||
if( outputSampleFormat & paNonInterleaved )
|
||||
{
|
||||
return paSampleFormatNotSupported;
|
||||
}
|
||||
|
||||
/* unless alternate device specification is supported, reject the use of
|
||||
paUseHostApiSpecificDeviceSpecification */
|
||||
|
||||
|
|
|
|||
|
|
@ -71,12 +71,12 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* This fnuction determines the size of a particular sample format.
|
||||
* This function determines the size of a particular sample format.
|
||||
* if the format is not recognized, this returns zero.
|
||||
*/
|
||||
static size_t computeSampleSizeFromFormat( PaSampleFormat format )
|
||||
{
|
||||
switch( format ) {
|
||||
switch( format & (~paNonInterleaved) ) {
|
||||
case paFloat32: return 4;
|
||||
case paInt32: return 4;
|
||||
case paInt24: return 3;
|
||||
|
|
@ -91,7 +91,7 @@ static size_t computeSampleSizeFromFormat( PaSampleFormat format )
|
|||
*/
|
||||
static size_t computeSampleSizeFromFormatPow2( PaSampleFormat format )
|
||||
{
|
||||
switch( format ) {
|
||||
switch( format & (~paNonInterleaved) ) {
|
||||
case paFloat32: return 4;
|
||||
case paInt32: return 4;
|
||||
case paInt24: return 4;
|
||||
|
|
|
|||
Loading…
Reference in a new issue