diff --git a/src/modules/module-example-filter.c b/src/modules/module-example-filter.c index 284c0cf67..5f6268dd8 100644 --- a/src/modules/module-example-filter.c +++ b/src/modules/module-example-filter.c @@ -161,7 +161,15 @@ static void capture_destroy(void *d) static void capture_process(void *d) { struct impl *impl = d; - pw_stream_trigger_process(impl->playback); + int res; + if ((res = pw_stream_trigger_process(impl->playback)) < 0) { + while (true) { + struct pw_buffer *t; + if ((t = pw_stream_dequeue_buffer(impl->capture)) == NULL) + break; + pw_stream_queue_buffer(impl->capture, t); + } + } } static void playback_process(void *d) diff --git a/src/modules/module-filter-chain.c b/src/modules/module-filter-chain.c index fd38b1e06..fb79e1989 100644 --- a/src/modules/module-filter-chain.c +++ b/src/modules/module-filter-chain.c @@ -896,7 +896,16 @@ static void capture_destroy(void *d) static void capture_process(void *d) { struct impl *impl = d; - pw_stream_trigger_process(impl->playback); + int res; + if ((res = pw_stream_trigger_process(impl->playback)) < 0) { + pw_log_debug("playback trigger error: %s", spa_strerror(res)); + while (true) { + struct pw_buffer *t; + if ((t = pw_stream_dequeue_buffer(impl->capture)) == NULL) + break; + pw_stream_queue_buffer(impl->capture, t); + } + } } static void playback_process(void *d) diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c index a991863d3..eda5c8230 100644 --- a/src/modules/module-loopback.c +++ b/src/modules/module-loopback.c @@ -310,7 +310,15 @@ static void recalculate_delay(struct impl *impl) static void capture_process(void *d) { struct impl *impl = d; - pw_stream_trigger_process(impl->playback); + int res; + if ((res = pw_stream_trigger_process(impl->playback)) < 0) { + while (true) { + struct pw_buffer *t; + if ((t = pw_stream_dequeue_buffer(impl->capture)) == NULL) + break; + pw_stream_queue_buffer(impl->capture, t); + } + } } static void playback_process(void *d)