mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
properly implement a pa_sink_disconnect() hook
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1243 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
87e64d5845
commit
8180832898
3 changed files with 7 additions and 4 deletions
|
|
@ -143,7 +143,10 @@ void pa_sink_disconnect(pa_sink* s) {
|
|||
assert(s);
|
||||
assert(s->state == PA_SINK_RUNNING);
|
||||
|
||||
s->state = PA_SINK_DISCONNECTED;
|
||||
pa_namereg_unregister(s->core, s->name);
|
||||
|
||||
pa_hook_fire(&s->core->hook_sink_disconnect, s);
|
||||
|
||||
while ((i = pa_idxset_first(s->inputs, NULL))) {
|
||||
assert(i != j);
|
||||
|
|
@ -163,7 +166,6 @@ void pa_sink_disconnect(pa_sink* s) {
|
|||
s->set_hw_mute = NULL;
|
||||
s->get_hw_mute = NULL;
|
||||
|
||||
s->state = PA_SINK_DISCONNECTED;
|
||||
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK | PA_SUBSCRIPTION_EVENT_REMOVE, s->index);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue