portaudio: use correct sink/source in init

This commit is contained in:
Matthias Ringwald 2019-03-04 15:24:48 +01:00
parent 8ade2a8bf5
commit 3abb6826ec

View File

@ -213,7 +213,7 @@ static int btstack_audio_portaudio_sink_init(
/* -- setup stream -- */
err = Pa_OpenStream(
&stream_source,
&stream_sink,
NULL,
&theOutputParameters,
samplerate,
@ -228,7 +228,7 @@ static int btstack_audio_portaudio_sink_init(
}
log_info("PortAudio: sink stream created");
const PaStreamInfo * stream_info = Pa_GetStreamInfo(stream_source);
const PaStreamInfo * stream_info = Pa_GetStreamInfo(stream_sink);
log_info("PortAudio: sink latency: %f", stream_info->outputLatency);
playback_callback = playback;
@ -277,7 +277,7 @@ static int btstack_audio_portaudio_source_init(
/* -- setup stream -- */
err = Pa_OpenStream(
&stream_sink,
&stream_source,
&theInputParameters,
NULL,
samplerate,
@ -292,7 +292,7 @@ static int btstack_audio_portaudio_source_init(
}
log_info("PortAudio: source stream created");
const PaStreamInfo * stream_info = Pa_GetStreamInfo(stream_sink);
const PaStreamInfo * stream_info = Pa_GetStreamInfo(stream_source);
log_info("PortAudio: source latency: %f", stream_info->inputLatency);
recording_callback = recording;