On Mon, 2015-03-23 at 06:27 +0100, Georg Chini wrote: > On 23.03.2015 05:01, Arun Raghavan wrote: > > On 22 March 2015 at 18:55, Georg Chini <georg at chini.tk> wrote: > >> This patch set combines the functionality of module-role-cork and module-role-ducking. > >> Module name is still module-role-cork (module-role-cork-duck somehow sounds a bit > >> like module-rubber-duck ...). > >> If you specify a volume, streams will be ducked, otherwise muted/corked. > >> It also adds support for streams without media.role and reacts to mute/cork > >> changes of the trigger stream and to property list changes. > >> > >> Georg Chini (3): > >> role-cork: Don't ignore streams without media.role > >> role-cork: React to mute/cork of trigger streams and to proplist > >> changes > >> role-cork: combine module-role-ducking and module-role-cork > >> > >> src/modules/module-role-cork.c | 141 ++++++++++++++++++++++++++++++++--------- > >> 1 file changed, 111 insertions(+), 30 deletions(-) > >> > >> -- > > I wouldn't mind some consolidation there but it seems like you can > > either cork or duck, but not both? A fairly standard case I can think > > of that needs this is something like - event over music => duck, phone > > over music => cork. > > > Basically I see three ways how to achieve this: > > 1) Remove the "load once" restriction so that you can use one instance > for corking and another for ducking (I'll test this later today) > 2) Add additional parameters "duck_trigger_roles" and "duck_roles" > 3) Keep two separate modules > > What would you prefer? I don't like the idea of doing ducking in a module called "module-role-cork". Consolidating the code of the modules makes sense, but I'd prefer to do that by adding a library that both modules can use. Replacing the two modules with a single module is unfortunately not feasible, because (at least in my opinion) we should maintain compatibility with old configuration files. -- Tanu