mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
echo-cancel: reuse buffer on error
Queue the dequeued buffers when there is an error so that we can recover.
This commit is contained in:
parent
b0068fd46b
commit
8485622923
1 changed files with 10 additions and 5 deletions
|
|
@ -147,7 +147,7 @@ static void process(struct impl *impl)
|
||||||
pw_log_warn("out of playback buffers: %m");
|
pw_log_warn("out of playback buffers: %m");
|
||||||
|
|
||||||
if (cin == NULL || cout == NULL || pin == NULL || pout == NULL)
|
if (cin == NULL || cout == NULL || pin == NULL || pout == NULL)
|
||||||
return;
|
goto done;
|
||||||
|
|
||||||
for (i = 0; i < impl->info.channels; i++) {
|
for (i = 0; i < impl->info.channels; i++) {
|
||||||
/* captured samples, with echo from sink */
|
/* captured samples, with echo from sink */
|
||||||
|
|
@ -178,9 +178,14 @@ static void process(struct impl *impl)
|
||||||
}
|
}
|
||||||
echo_cancel_run(impl->aec_info, impl->aec, rec, play, out, size / sizeof(float));
|
echo_cancel_run(impl->aec_info, impl->aec, rec, play, out, size / sizeof(float));
|
||||||
|
|
||||||
|
done:
|
||||||
|
if (cin != NULL)
|
||||||
pw_stream_queue_buffer(impl->capture, cin);
|
pw_stream_queue_buffer(impl->capture, cin);
|
||||||
|
if (cout != NULL)
|
||||||
pw_stream_queue_buffer(impl->source, cout);
|
pw_stream_queue_buffer(impl->source, cout);
|
||||||
|
if (pin != NULL)
|
||||||
pw_stream_queue_buffer(impl->sink, pin);
|
pw_stream_queue_buffer(impl->sink, pin);
|
||||||
|
if (pout != NULL)
|
||||||
pw_stream_queue_buffer(impl->playback, pout);
|
pw_stream_queue_buffer(impl->playback, pout);
|
||||||
|
|
||||||
impl->sink_ready = false;
|
impl->sink_ready = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue