[pulseaudio-discuss] [PATCH] virtual-surround-sink: Fix setting max_rewind.

Tanu Kaskinen tanuk at iki.fi
Sun Aug 19 04:55:58 PDT 2012


The sink has different frame size than the sink input, so
the max_rewind value of the sink input needs to be converted
when setting the sink max_rewind value.

The conversion is already done correctly in
sink_input_update_max_rewind_cb().
---
 src/modules/module-virtual-surround-sink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/module-virtual-surround-sink.c b/src/modules/module-virtual-surround-sink.c
index fc8f898..df36876 100644
--- a/src/modules/module-virtual-surround-sink.c
+++ b/src/modules/module-virtual-surround-sink.c
@@ -386,7 +386,7 @@ static void sink_input_attach_cb(pa_sink_input *i) {
 
     /* FIXME: Too small max_rewind:
      * https://bugs.freedesktop.org/show_bug.cgi?id=53709 */
-    pa_sink_set_max_rewind_within_thread(u->sink, pa_sink_input_get_max_rewind(i));
+    pa_sink_set_max_rewind_within_thread(u->sink, pa_sink_input_get_max_rewind(i) * u->sink_fs / u->fs);
 
     pa_sink_attach_within_thread(u->sink);
 }
-- 
1.7.10.4



More information about the pulseaudio-discuss mailing list