diff options
author | 2016-07-07 17:29:08 +0200 | |
---|---|---|
committer | 2016-10-11 17:09:07 +0200 | |
commit | cc70e0ae30920ca835bf011f8040afb6fea43f45 (patch) | |
tree | c4d503c5a556bee69842f38b28e85a182c70bfb8 /discover.c | |
parent | 2478974dfde05063cbf0233e3d3c434ca2f46c7c (diff) |
Implement routing groups and volume ramp up/down
Change-Id: I0e9d3b8b8be4d124907214c165617d86be6906fc
Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'discover.c')
-rw-r--r-- | discover.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -743,12 +743,10 @@ void agl_discover_register_source_output (struct userdata *u, pa_source_output * void agl_discover_add_sink_input (struct userdata *u, pa_sink_input *sinp) { - pa_core *core; agl_node *node; pa_assert (u); pa_assert (sinp); - pa_assert_se (core = u->core); if (!sinp->client) return; @@ -759,16 +757,22 @@ void agl_discover_add_sink_input (struct userdata *u, pa_sink_input *sinp) /* start routing */ agl_router_register_node (u, node); + + /* apply priority effects */ + agl_router_apply_node_priority_effect (u, node, true); } void agl_discover_remove_sink_input (struct userdata *u, pa_sink_input *sinp) { - pa_core *core; - agl_node *node; + agl_nodeset *nodeset; + agl_node *node, *n; + pa_sink *sink; + int priority; + uint32_t index; pa_assert (u); pa_assert (sinp); - pa_assert_se (core = u->core); + pa_assert_se (nodeset = u->nodeset); if (!sinp->client) return; @@ -779,4 +783,10 @@ void agl_discover_remove_sink_input (struct userdata *u, pa_sink_input *sinp) /* stop routing */ agl_router_unregister_node (u, node); + + /* un-apply priority effects */ + agl_router_apply_node_priority_effect (u, node, false); + + /* remove node */ + agl_node_destroy (u, node); } |