role-ducking: Add support for ducking group

System Internals / PulseAudio - Sangchul Lee [gmail.com] - 20 April 2016 08:31 UTC

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.

b08f383 role-ducking: Add support for ducking group
src/modules/module-role-ducking.c | 6 +-
src/modules/stream-interaction.c | 293 ++++++++++++++++++++++++++-----------
2 files changed, 212 insertions(+), 87 deletions(-)

Upstream: cgit.freedesktop.org


  • Share