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;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inputParameters.device = indev;
|
inputParameters.device = indev;
|
||||||
if (indev != -1) {
|
if (indev != -1) {
|
||||||
inputParameters.channelCount = 1;
|
inputParameters.channelCount = 1;
|
||||||
|
@ -2417,10 +2418,13 @@ static audio_stream_t *create_audio_stream(int indev, int outdev)
|
||||||
inputParameters.hostApiSpecificStreamInfo = NULL;
|
inputParameters.hostApiSpecificStreamInfo = NULL;
|
||||||
}
|
}
|
||||||
outputParameters.device = outdev;
|
outputParameters.device = outdev;
|
||||||
outputParameters.channelCount = 1;
|
|
||||||
outputParameters.sampleFormat = SAMPLE_TYPE;
|
if (outdev != -1) {
|
||||||
outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;
|
outputParameters.channelCount = 1;
|
||||||
outputParameters.hostApiSpecificStreamInfo = NULL;
|
outputParameters.sampleFormat = SAMPLE_TYPE;
|
||||||
|
outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;
|
||||||
|
outputParameters.hostApiSpecificStreamInfo = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
err = open_audio_stream(&(stream->stream), &inputParameters, &outputParameters);
|
err = open_audio_stream(&(stream->stream), &inputParameters, &outputParameters);
|
||||||
if (err != paNoError) {
|
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 *get_audio_stream(int indev, int outdev)
|
||||||
{
|
{
|
||||||
audio_stream_t *stream;
|
audio_stream_t *stream = NULL;
|
||||||
if (outdev == -1) {
|
if (outdev == -1) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error invalid output audio device\n");
|
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) {
|
if (create_codecs(0) != SWITCH_STATUS_SUCCESS) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
stream = find_audio_stream(indev, outdev, 0);
|
stream = find_audio_stream(indev, outdev, 0);
|
||||||
if (stream != NULL) {
|
if (stream != NULL) {
|
||||||
return stream;
|
return stream;
|
||||||
|
|
Loading…
Reference in New Issue