FS-5280 --resolve bitch n bail
This commit is contained in:
parent
cb8d51a67c
commit
227af62a4a
|
@ -2409,6 +2409,7 @@ static audio_stream_t *create_audio_stream(int indev, int outdev)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
inputParameters.device = indev;
|
||||
if (indev != -1) {
|
||||
inputParameters.channelCount = 1;
|
||||
|
@ -2417,10 +2418,13 @@ static audio_stream_t *create_audio_stream(int indev, int outdev)
|
|||
inputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
}
|
||||
outputParameters.device = outdev;
|
||||
outputParameters.channelCount = 1;
|
||||
outputParameters.sampleFormat = SAMPLE_TYPE;
|
||||
outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;
|
||||
outputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
|
||||
if (outdev != -1) {
|
||||
outputParameters.channelCount = 1;
|
||||
outputParameters.sampleFormat = SAMPLE_TYPE;
|
||||
outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;
|
||||
outputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
}
|
||||
|
||||
err = open_audio_stream(&(stream->stream), &inputParameters, &outputParameters);
|
||||
if (err != paNoError) {
|
||||
|
@ -2444,13 +2448,19 @@ static audio_stream_t *create_audio_stream(int indev, int outdev)
|
|||
|
||||
audio_stream_t *get_audio_stream(int indev, int outdev)
|
||||
{
|
||||
audio_stream_t *stream;
|
||||
audio_stream_t *stream = NULL;
|
||||
if (outdev == -1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error invalid output audio device\n");
|
||||
return NULL;
|
||||
}
|
||||
if (indev == -1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error invalid input audio device\n");
|
||||
return NULL;
|
||||
}
|
||||
if (create_codecs(0) != SWITCH_STATUS_SUCCESS) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
stream = find_audio_stream(indev, outdev, 0);
|
||||
if (stream != NULL) {
|
||||
return stream;
|
||||
|
|
Loading…
Reference in New Issue