]> code.delx.au - pulseaudio/commitdiff
sink: trigger subscribe event on sink state change
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Thu, 15 Jan 2009 15:28:33 +0000 (17:28 +0200)
committerMarc-André Lureau <marcandre.lureau@gmail.com>
Mon, 19 Jan 2009 22:16:18 +0000 (00:16 +0200)
src/pulsecore/sink.c

index 2abc848acfc8d325e93575df307cc0d1963ddadf..bd90cf566ed3273d10ef3d532bb7f6d60c11a876 100644 (file)
@@ -311,8 +311,10 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
                 i->suspend(i, state == PA_SINK_SUSPENDED);
     }
 
-    if (state != PA_SINK_UNLINKED) /* if we enter UNLINKED state pa_sink_unlink() will fire the apropriate events */
+    if (state != PA_SINK_UNLINKED) /* if we enter UNLINKED state pa_sink_unlink() will fire the apropriate events */
         pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_STATE_CHANGED], s);
+        pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK | PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    }
 
     return 0;
 }