[pulseaudio-commits] r1899 - in /branches/lennart/src/pulsecore: sink-input.c source-output.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Sep 24 15:41:00 PDT 2007


Author: lennart
Date: Tue Sep 25 00:41:00 2007
New Revision: 1899

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1899&root=pulseaudio&view=rev
Log:
fix IDLE vs. RUNNING state handling of sinks/sources when changing cork status for streams

Modified:
    branches/lennart/src/pulsecore/sink-input.c
    branches/lennart/src/pulsecore/source-output.c

Modified: branches/lennart/src/pulsecore/sink-input.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/sink-input.c?rev=1899&root=pulseaudio&r1=1898&r2=1899&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/sink-input.c (original)
+++ branches/lennart/src/pulsecore/sink-input.c Tue Sep 25 00:41:00 2007
@@ -233,6 +233,8 @@
         pa_assert_se(i->sink->n_corked -- >= 1);
     else if (i->state != PA_SINK_INPUT_CORKED && state == PA_SINK_INPUT_CORKED)
         i->sink->n_corked++;
+
+    pa_sink_update_status(i->sink);
 }
 
 static int sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
@@ -349,6 +351,9 @@
     i->thread_info.state = i->state = i->flags & PA_SINK_INPUT_START_CORKED ? PA_SINK_INPUT_CORKED : PA_SINK_INPUT_RUNNING;
     i->thread_info.volume = i->volume;
     i->thread_info.muted = i->muted;
+
+    if (i->state == PA_SINK_INPUT_CORKED)
+        i->sink->n_corked++;
 
     pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_ADD_INPUT, i, 0, NULL);
     pa_sink_update_status(i->sink);

Modified: branches/lennart/src/pulsecore/source-output.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/source-output.c?rev=1899&root=pulseaudio&r1=1898&r2=1899&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/source-output.c (original)
+++ branches/lennart/src/pulsecore/source-output.c Tue Sep 25 00:41:00 2007
@@ -188,6 +188,8 @@
     else if (o->state != PA_SOURCE_OUTPUT_CORKED && state == PA_SOURCE_OUTPUT_CORKED)
         o->source->n_corked++;
 
+    pa_source_update_status(o->source);
+
     o->state = state;
 
     return 0;
@@ -261,6 +263,9 @@
     pa_assert(o->push);
 
     o->thread_info.state = o->state = o->flags & PA_SOURCE_OUTPUT_START_CORKED ? PA_SOURCE_OUTPUT_CORKED : PA_SOURCE_OUTPUT_RUNNING;
+
+    if (o->state == PA_SOURCE_OUTPUT_CORKED)
+        o->source->n_corked++;
 
     pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_ADD_OUTPUT, o, 0, NULL);
     pa_source_update_status(o->source);




More information about the pulseaudio-commits mailing list