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_multi_sine.c

    r1097 r1368  
    125125 
    126126    outputParameters.device = Pa_GetDefaultOutputDevice();  /* Default output device, max channels. */ 
     127    if (outputParameters.device == paNoDevice) { 
     128      fprintf(stderr,"Error: No default output device.\n"); 
     129      return paInvalidDevice; 
     130    } 
    127131    pdi = Pa_GetDeviceInfo(outputParameters.device); 
    128132    outputParameters.channelCount = pdi->maxOutputChannels;