[pulseaudio-commits] r1248 - /trunk/src/pulsecore/source.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Aug 13 12:53:19 PDT 2006


Author: lennart
Date: Sun Aug 13 21:53:18 2006
New Revision: 1248

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1248&root=pulseaudio&view=rev
Log:
implement hook_source_disconnect

Modified:
    trunk/src/pulsecore/source.c

Modified: trunk/src/pulsecore/source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/source.c?rev=1248&root=pulseaudio&r1=1247&r2=1248&view=diff
==============================================================================
--- trunk/src/pulsecore/source.c (original)
+++ trunk/src/pulsecore/source.c Sun Aug 13 21:53:18 2006
@@ -125,7 +125,10 @@
     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 @@
     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);
 }
 




More information about the pulseaudio-commits mailing list