From 9379d4015c48ed15a9f5bde8dac085dbca08bea3 Mon Sep 17 00:00:00 2001 From: Kim Therkelsen Date: Fri, 15 Oct 2010 09:25:12 +0200 Subject: core: Added new hooks: PA_CORE_HOOK_SOURCE_PORT_CHANGED and PA_CORE_HOOK_SINK_PORT_CHANGED This allows modules to know when certain ports are changed. This will allow e.g. a filter module (or LADSAP) to only load when a certain port is used on the device (e.g. to only filter headphones and not normal speakers). (Comment from Colin Guthrie: This may also have use in UCM) --- src/pulsecore/source.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/pulsecore/source.c') diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 24d0ff6b..a5536629 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -1571,5 +1571,7 @@ int pa_source_set_port(pa_source *s, const char *name, pa_bool_t save) { s->active_port = port; s->save_port = save; + pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_PORT_CHANGED], s); + return 0; } -- cgit