Changeset 1315

Show
Ignore:
Timestamp:
01/22/08 18:02:18 (7 months ago)
Author:
bjornroche
Message:

some assertion cleanup

Files:
1 modified

Legend:

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

    r1312 r1315  
    129129   err = PaUtil_GetHostApiRepresentation( &hostApi, paCoreAudio ); 
    130130   assert(err == paNoError); 
     131   if( err != paNoError ) 
     132      return NULL; 
    131133   PaMacAUHAL *macCoreHostApi = (PaMacAUHAL*)hostApi; 
    132134   AudioDeviceID hostApiDevice = macCoreHostApi->devIds[device]; 
     
    318320   err = AudioUnitGetProperty( ci, kAudioOutputUnitProperty_IsRunning, inScope, inElement, &isRunning, &size ); 
    319321   assert( !err ); 
     322   if( err ) 
     323      isRunning = false; //it's very unclear what to do in case of error here. There's no real way to notify the user, and crashing seems unreasonable. 
    320324   if( isRunning ) 
    321325      return; //We are only interested in when we are stopping 
     
    18291833                    inNumberFrames, 
    18301834                    &stream->inputAudioBufferList ); 
    1831       /* FEEDBACK: I'm not sure what to do when this call fails */ 
     1835      /* FEEDBACK: I'm not sure what to do when this call fails. There's nothing in the PA API to 
     1836       * do about failures in the callback system. */ 
    18321837      assert( !err ); 
    18331838