summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2012-08-22 09:00:25 +0300
committerTanu Kaskinen <tanuk@iki.fi>2012-10-30 16:28:48 +0200
commit3adbb5ad034684ff751def0144764be8442fb15c (patch)
tree5bb3ce97cbe80882ead689131849e818f71429b5
parent1fc2cf8425eff768e117bb4eff659204fdaf81dc (diff)
virtual-surround-sink: Fix setting max_request and max_rewind.
The sink has different frame size than the sink input, so the max_request and max_rewind values of the sink input need to be converted when setting the sink max_request and max_rewind values. The conversion is already done correctly in sink_input_update_max_request_cb() and sink_input_update_max_rewind_cb().
-rw-r--r--src/modules/module-virtual-surround-sink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/module-virtual-surround-sink.c b/src/modules/module-virtual-surround-sink.c
index e5c5dc13..49152783 100644
--- a/src/modules/module-virtual-surround-sink.c
+++ b/src/modules/module-virtual-surround-sink.c
@@ -382,11 +382,11 @@ static void sink_input_attach_cb(pa_sink_input *i) {
pa_sink_set_fixed_latency_within_thread(u->sink, i->sink->thread_info.fixed_latency);
- pa_sink_set_max_request_within_thread(u->sink, pa_sink_input_get_max_request(i));
+ pa_sink_set_max_request_within_thread(u->sink, pa_sink_input_get_max_request(i) * u->sink_fs / u->fs);
/* 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);
}