implement hook_source_disconnect

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1248 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-08-13 19:53:18 +00:00
parent 8f91b1f4c4
commit 79cb80c574

View file

@ -125,7 +125,10 @@ void pa_source_disconnect(pa_source *s) {
assert(s);
assert(s->state == PA_SOURCE_RUNNING);
s->state = PA_SOURCE_DISCONNECTED;
pa_namereg_unregister(s->core, s->name);
pa_hook_fire(&s->core->hook_source_disconnect, s);
while ((o = pa_idxset_first(s->outputs, NULL))) {
assert(o != j);
@ -142,7 +145,6 @@ void pa_source_disconnect(pa_source *s) {
s->set_hw_mute = NULL;
s->get_hw_mute = NULL;
s->state = PA_SOURCE_DISCONNECTED;
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE | PA_SUBSCRIPTION_EVENT_REMOVE, s->index);
}