Ticket #30: pa_front.c.patch

File pa_front.c.patch, 2.5 KB (added by rossb, 2 years ago)
  • src/common/pa_front.c

    RCS file: /u/formes/share/cvsroot/portaudiov19c2/src/common/pa_front.c,v
    retrieving revision 1.1
    retrieving revision 1.3
    diff -B -b -w -U3 -r1.1 -r1.3
     
    242242            assert( hostApi->info.defaultInputDevice < hostApi->info.deviceCount ); 
    243243            assert( hostApi->info.defaultOutputDevice < hostApi->info.deviceCount ); 
    244244 
    245             hostApis_[hostApisCount_]->privatePaFrontInfo.baseDeviceIndex = baseDeviceIndex; 
     245            hostApi->privatePaFrontInfo.baseDeviceIndex = baseDeviceIndex; 
    246246 
    247247            if( hostApis_[hostApisCount_]->info.defaultInputDevice != paNoDevice ) 
    248248                hostApis_[hostApisCount_]->info.defaultInputDevice += baseDeviceIndex; 
     
    10941094                              double sampleRate ) 
    10951095{ 
    10961096    PaError result; 
    1097     PaUtilHostApiRepresentation *hostApi; 
     1097    PaUtilHostApiRepresentation *hostApi=0; 
    10981098    PaDeviceIndex hostApiInputDevice, hostApiOutputDevice; 
    10991099    PaStreamParameters hostApiInputParameters, hostApiOutputParameters; 
    11001100    PaStreamParameters *hostApiInputParametersPtr, *hostApiOutputParametersPtr; 
     
    12091209                       void *userData ) 
    12101210{ 
    12111211    PaError result; 
    1212     PaUtilHostApiRepresentation *hostApi; 
     1212    PaUtilHostApiRepresentation *hostApi=0; 
    12131213    PaDeviceIndex hostApiInputDevice, hostApiOutputDevice; 
    12141214    PaStreamParameters hostApiInputParameters, hostApiOutputParameters; 
    12151215    PaStreamParameters *hostApiInputParametersPtr, *hostApiOutputParametersPtr; 
     
    13701370    if( inputChannelCount > 0 ) 
    13711371    { 
    13721372        hostApiInputParameters.device = Pa_GetDefaultInputDevice(); 
     1373        if(hostApiInputParameters.device == paNoDevice) { 
     1374          return paDeviceUnavailable; 
     1375        } 
    13731376        hostApiInputParameters.channelCount = inputChannelCount; 
    13741377        hostApiInputParameters.sampleFormat = sampleFormat; 
    13751378        /* defaultHighInputLatency is used below instead of 
     
    13901393    if( outputChannelCount > 0 ) 
    13911394    { 
    13921395        hostApiOutputParameters.device = Pa_GetDefaultOutputDevice(); 
     1396        if(hostApiOutputParameters.device == paNoDevice) { 
     1397          return paDeviceUnavailable; 
     1398        } 
    13931399        hostApiOutputParameters.channelCount = outputChannelCount; 
    13941400        hostApiOutputParameters.sampleFormat = sampleFormat; 
    13951401        /* defaultHighOutputLatency is used below instead of