[pulseaudio-discuss] [PATCH v3] role-ducking: Add support for ducking group

Tanu Kaskinen tanuk at iki.fi
Wed Apr 20 13:32:24 UTC 2016


On Wed, 2016-04-13 at 10:48 +0900, Sangchul Lee wrote:
> Now, trigger_roles, ducking_roles and volume can be divided into several groups by slash.
> That means each group can be affected by its own volume policy.
> 
> If we need to apply ducking volume level differently that is triggered from
> each trigger role(s), this feature would be useful for this purpose.
> 
> For example, let's assume that tts should take music and video's volume down to 40%
> whereas voice_recognition should take those and tts's volume down to 20%.
> In this case, the configuration can be written as below.
>   trigger_roles=tts/voice_recognition ducking_roles=music,video/music,video,tts volume=40%/20%
> 
> If one of ducking role is affected by more than two trigger roles simultaneously,
> volume of the ducking role will be applied by method of multiplication.
> And it works in the same way as before without any slash.
> 
> Signed-off-by: Sangchul Lee <sc11.lee at samsung.com>
> ---
> 
> Here's updated patch for v3.
> Thanks for the review, tanu.
> 
> Notes:
>  v2 changelog: revise codes according to Tanu's comments
>   - commit message enhancement
>   - definition of group structure
>   - rename variable and revise logs
>   - handle error case of empty parsed string
>   - fix codes to follow coding convention for private struct
>   - pass pointer directly instead of group index
> 
>  v3 changelog: it is integrated with the latest upstream codes
>   - remove a duplicate member of userdata
>   - revise an inappropriate log message and comparison for indicating a failure
>   - fix invalid logic regarding removing hashmap for interaction_state
> 
>  src/modules/module-role-ducking.c |   6 +-
>  src/modules/stream-interaction.c  | 293 +++++++++++++++++++++++++++-----------
>  2 files changed, 212 insertions(+), 87 deletions(-)

Thanks! Applied.

-- 
Tanu


More information about the pulseaudio-discuss mailing list