Show
Ignore:
Timestamp:
02/29/08 19:38:27 (9 months ago)
Author:
rossb
Message:

patch from magnus jonsson to print error instead of crash in tests when there is no default input (or output) device. changes to paqa_errs are related to ticket #61

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • portaudio/branches/v19-devel/test/patest_pink.c

    r1097 r1368  
    237237    /* Open a stereo PortAudio stream so we can hear the result. */ 
    238238    outputParameters.device = Pa_GetDefaultOutputDevice(); /* Take the default output device. */ 
     239    if (outputParameters.device == paNoDevice) { 
     240      fprintf(stderr,"Error: No default output device.\n"); 
     241      goto error; 
     242    } 
    239243    outputParameters.channelCount = 2;                     /* Stereo output, most likely supported. */ 
    240244    outputParameters.hostApiSpecificStreamInfo = NULL;