diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2009-01-15 17:28:33 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2009-01-20 00:16:18 +0200 |
commit | 6374f8e427269c16afcd9d8a2536eec260d28ef6 (patch) | |
tree | ddaa79c792caa19dd9cf585996aed0ba3855cb91 | |
parent | 9c4f8e627a70fc610a81da2703eeddfde4a7e4fa (diff) |
sink: trigger subscribe event on sink state change
-rw-r--r-- | src/pulsecore/sink.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |