c->is_system_instance = 0;
pa_hook_init(&c->hook_sink_input_new, c);
- pa_hook_init(&c->hook_sink_input_disconnect, c);
+ pa_hook_init(&c->hook_sink_disconnect, c);
pa_property_init(c);
pa_property_cleanup(c);
pa_hook_free(&c->hook_sink_input_new);
- pa_hook_free(&c->hook_sink_input_disconnect);
+ pa_hook_free(&c->hook_sink_disconnect);
pa_xfree(c);
}
int is_system_instance;
/* hooks */
- pa_hook hook_sink_input_new, hook_sink_input_disconnect;
+ pa_hook hook_sink_input_new,
+ hook_sink_disconnect;
};
pa_core* pa_core_new(pa_mainloop_api *m);
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);
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);
}