Changeset 1311

Show
Ignore:
Timestamp:
01/12/08 13:15:22 (8 months ago)
Author:
bjornroche
Message:

fixed code inside asserts as suggested by Jorge Acerda Macia.

Location:
portaudio/branches/v19-devel/src/hostapi/coreaudio
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • portaudio/branches/v19-devel/src/hostapi/coreaudio/pa_mac_core.c

    r1304 r1311  
    315315   UInt32 isRunning; 
    316316   UInt32 size = sizeof( isRunning ); 
    317    assert( !AudioUnitGetProperty( ci, kAudioOutputUnitProperty_IsRunning, inScope, inElement, &isRunning, &size ) ); 
     317   OSStatus err; 
     318   err = AudioUnitGetProperty( ci, kAudioOutputUnitProperty_IsRunning, inScope, inElement, &isRunning, &size ); 
     319   assert( !err ); 
    318320   if( isRunning ) 
    319321      return; //We are only interested in when we are stopping 
  • portaudio/branches/v19-devel/src/hostapi/coreaudio/pa_mac_core_blocking.c

    r1304 r1311  
    122122   void *data; 
    123123   int result; 
     124   OSStatus err; 
    124125 
    125126   /* zeroify things */ 
     
    170171      } 
    171172 
    172       assert( 0 == PaUtil_InitializeRingBuffer( 
     173      err = PaUtil_InitializeRingBuffer( 
    173174            &blio->inputRingBuffer, 
    174175            ringBufferSize*blio->inputSampleSizePow2*inChan, 
    175             data ) ); 
     176            data ); 
     177      assert( !err ); 
    176178   } 
    177179   if( outChan ) { 
     
    183185      } 
    184186 
    185       assert( 0 == PaUtil_InitializeRingBuffer( 
     187      err = PaUtil_InitializeRingBuffer( 
    186188            &blio->outputRingBuffer, 
    187189            ringBufferSize*blio->outputSampleSizePow2*outChan, 
    188             data ) ); 
     190            data ); 
     191      assert( !err ); 
    189192   } 
    190193 
     
    345348   long toRead; 
    346349   long toWrite; 
     350   long read; 
     351   long written; 
    347352 
    348353   /* set flags returned by OS: */ 
     
    361366      /* copy the data */ 
    362367      /*printf( "reading %d\n", toRead );*/ 
    363       assert( toRead == PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, toRead ) ); 
     368      read = PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, toRead ); 
     369      assert( toRead == read ); 
    364370#ifdef PA_MAC__BLIO_MUTEX 
    365371      /* Priority inversion. See notes below. */ 
     
    384390      /* copy the data */ 
    385391      /*printf( "writing %d\n", toWrite );*/ 
    386       assert( toWrite == PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, toWrite ) ); 
     392      written = PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, toWrite ); 
     393      assert( toWrite == written ); 
    387394#ifdef PA_MAC__BLIO_MUTEX 
    388395      /* We have a priority inversion here. However, we will only have to