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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux