Understanding the mix policy when using multiple audio types with the same priority

If you have multiple audio types with the same priority and duck_same_prio_policy set to mix, when those types of streams play together, their volume levels are ducked according to each type's duck_same_prior_percent setting.

Any new active streams immediately apply ducking to other audio streams with the same priority and the ducking settings of the other audio streams are applied to the new stream. If multiple ducking percentages apply, then the strictest (lowest) value is applied.

For audio streams with a lower priority than this kind of audio stream group (types with the same priority and configured as mix), the strictest (lowest) value of the active group members is also applied.

For example, three audio types (multimedia1, multimedia2, and multimedia3) are configured with same priority and for two channels (stereo). Each audio type has the following channel settings for duck_same_prio_percent:

When audio streams that use two of these audio types play concurrently, the streams duck each other by the specified percentages.

However, when all three types play, the volume for each stream decreases to the lowest (strictest) value of the two other types and audio concurrency management ducks the audio streams to the following percentages:

For a stream with a lower priority, if all these example streams are playing, the ducking percentages are ch0=0 and ch1=50 (the lowest values for each channel found in the group).

Here's what these example audio types look like in the audio policy configuration file:

...
...
[audio_type]
name=multimedia1
prio=same
duck_same_prio_policy=mix
duck_same_prio_percent=ch0:10,ch1:50
duck_lower_prio_percent=20

[audio_type]
name=multimedia2
prio=same
duck_same_prio_policy=mix
duck_same_prio_percent=ch0:0,ch1:100
duck_lower_prio_percent=20

[audio_type]
name=multimedia3
prio=same
duck_same_prio_policy=mix
duck_same_prio_percent=ch0:100,ch1:100
duck_lower_prio_percent=20
...
...