[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. d3c1c920f05b5576c15152b70966dc7bf2b81dc1

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Jun 20 14:05:45 PDT 2008


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  add6c0361ada8c2aa632392efcec538a07af5bce (commit)

- Log -----------------------------------------------------------------
d3c1c92... Request a rewrite immediately after we have been linked, so that playback starts immediately
-----------------------------------------------------------------------

Summary of changes:
 src/modules/module-combine.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

-----------------------------------------------------------------------

commit d3c1c920f05b5576c15152b70966dc7bf2b81dc1
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jun 20 23:04:12 2008 +0200

    Request a rewrite immediately after we have been linked, so that playback starts immediately

diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index a90d409..cef7a99 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -490,6 +490,20 @@ static void sink_input_kill_cb(pa_sink_input *i) {
     output_free(o);
 }
 
+/* Called from IO thread context */
+static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
+    struct userdata *u;
+
+    pa_sink_input_assert_ref(i);
+    pa_assert_se(u = i->userdata);
+
+    /* If we are added for the first time, ask for a rewinding so that
+     * we are heard right-away. */
+    if (PA_SINK_INPUT_IS_LINKED(state) &&
+        i->thread_info.state == PA_SINK_INPUT_INIT)
+        pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
+}
+
 /* Called from thread context */
 static int sink_input_process_msg(pa_msgobject *obj, int code, void *data, int64_t offset, pa_memchunk *chunk) {
     struct output *o = PA_SINK_INPUT(obj)->userdata;
@@ -791,6 +805,7 @@ static int output_create_sink_input(struct output *o) {
     o->sink_input->parent.process_msg = sink_input_process_msg;
     o->sink_input->pop = sink_input_pop_cb;
     o->sink_input->process_rewind = sink_input_process_rewind_cb;
+    o->sink_input->state_change = sink_input_state_change_cb;
     o->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
     o->sink_input->update_max_request = sink_input_update_max_request_cb;
     o->sink_input->attach = sink_input_attach_cb;

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list