From 6374f8e427269c16afcd9d8a2536eec260d28ef6 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 15 Jan 2009 17:28:33 +0200 Subject: sink: trigger subscribe event on sink state change --- src/pulsecore/sink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pulsecore') diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 2abc848a..bd90cf56 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -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; } -- cgit