[pulseaudio-commits] src/modules
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Mon Nov 6 09:48:14 UTC 2017
src/modules/module-remap-source.c | 12 ++++++++++++
src/modules/module-virtual-source.c | 12 ++++++++++++
2 files changed, 24 insertions(+)
New commits:
commit 27067dbc7525deab200cbb0939b8a3205b3b51ce
Author: Tanu Kaskinen <tanuk at iki.fi>
Date: Tue Oct 31 15:29:26 2017 +0200
remap-source, virtual-source: fix max_rewind handling
The filter sources should have the same max_rewind as the master source,
but these modules didn't update max_rewind when the master max_rewind
changed.
diff --git a/src/modules/module-remap-source.c b/src/modules/module-remap-source.c
index 281d651f..980f2554 100644
--- a/src/modules/module-remap-source.c
+++ b/src/modules/module-remap-source.c
@@ -176,6 +176,17 @@ static void source_output_process_rewind_cb(pa_source_output *o, size_t nbytes)
}
/* Called from output thread context */
+static void source_output_update_max_rewind_cb(pa_source_output *o, size_t nbytes) {
+ struct userdata *u;
+
+ pa_source_output_assert_ref(o);
+ pa_source_output_assert_io_context(o);
+ pa_assert_se(u = o->userdata);
+
+ pa_source_set_max_rewind_within_thread(u->source, nbytes);
+}
+
+/* Called from output thread context */
static void source_output_detach_cb(pa_source_output *o) {
struct userdata *u;
@@ -387,6 +398,7 @@ int pa__init(pa_module*m) {
u->source_output->push = source_output_push_cb;
u->source_output->process_rewind = source_output_process_rewind_cb;
+ u->source_output->update_max_rewind = source_output_update_max_rewind_cb;
u->source_output->kill = source_output_kill_cb;
u->source_output->attach = source_output_attach_cb;
u->source_output->detach = source_output_detach_cb;
diff --git a/src/modules/module-virtual-source.c b/src/modules/module-virtual-source.c
index 94907dfa..8ec4525a 100644
--- a/src/modules/module-virtual-source.c
+++ b/src/modules/module-virtual-source.c
@@ -371,6 +371,17 @@ static void source_output_process_rewind_cb(pa_source_output *o, size_t nbytes)
}
/* Called from output thread context */
+static void source_output_update_max_rewind_cb(pa_source_output *o, size_t nbytes) {
+ struct userdata *u;
+
+ pa_source_output_assert_ref(o);
+ pa_source_output_assert_io_context(o);
+ pa_assert_se(u = o->userdata);
+
+ pa_source_set_max_rewind_within_thread(u->source, nbytes);
+}
+
+/* Called from output thread context */
static void source_output_attach_cb(pa_source_output *o) {
struct userdata *u;
@@ -605,6 +616,7 @@ int pa__init(pa_module*m) {
u->source_output->push = source_output_push_cb;
u->source_output->process_rewind = source_output_process_rewind_cb;
+ u->source_output->update_max_rewind = source_output_update_max_rewind_cb;
u->source_output->kill = source_output_kill_cb;
u->source_output->attach = source_output_attach_cb;
u->source_output->detach = source_output_detach_cb;
More information about the pulseaudio-commits
mailing list