[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Mon Jul 8 07:54:50 PDT 2013


 src/modules/module-loopback.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 8c81f4d0bd80ba707213925d5263cd86b8ee5e65
Author: Mikel Astiz <mikel.astiz at bmw-carit.de>
Date:   Mon Jul 1 10:27:21 2013 +0200

    loopback: Fix cork state not updated after move
    
    The source output and sink inputs should be corked if the corresponding
    sink/source is suspended, as handled during module initialization. This
    also needs to be handled during stream move, because the suspend state
    of the destination sink/source might be different to the previous one.
    
    This fixes the issue with an infinite number of "Requesting rewind due
    to end of underrun" traces after a stream move.

diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 5876f9d..e24ded5 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -419,6 +419,13 @@ static void source_output_moving_cb(pa_source_output *o, pa_source *dest) {
 
     pa_sink_input_update_proplist(u->sink_input, PA_UPDATE_REPLACE, p);
     pa_proplist_free(p);
+
+    if (pa_source_get_state(dest) == PA_SOURCE_SUSPENDED)
+        pa_sink_input_cork(u->sink_input, true);
+    else
+        pa_sink_input_cork(u->sink_input, false);
+
+    update_adjust_timer(u);
 }
 
 /* Called from main thread */
@@ -684,6 +691,13 @@ static void sink_input_moving_cb(pa_sink_input *i, pa_sink *dest) {
 
     pa_source_output_update_proplist(u->source_output, PA_UPDATE_REPLACE, p);
     pa_proplist_free(p);
+
+    if (pa_sink_get_state(dest) == PA_SINK_SUSPENDED)
+        pa_source_output_cork(u->source_output, true);
+    else
+        pa_source_output_cork(u->source_output, false);
+
+    update_adjust_timer(u);
 }
 
 /* Called from main thread */



More information about the pulseaudio-commits mailing list