Hi Mark,
there are module-role-cork and module-role-ducking which provide the
kind of functionality
you are looking for. If you have a stream with "role1" assigned, which
should duck all other
streams, the command would be something like
pactl load-module module-role-ducking trigger_roles="role1"
ducking_roles="any_role" global=1
The grouping of roles works for both, module-role-cork and
module-role-ducking even though
it is only mentioned in the description of module-role-ducking.
(pacmd describe-module module-role-ducking) You can use the special
roles "any_role" to specify
all streams and "no_role" for those streams that do not have a role
assigned.
The main problem is to make sure that your (trigger) streams always have
the correct role,
so you have to set the media.role property somehow.
Regards
Georg
On 04.05.24 10:27, Mark Gaiser wrote:
Hi,
Let me first try to describe what I'm trying to do. Perhaps there is
an existing solution for this already that I haven't found yet.
This is mostly for home automation purposes. Imagine you have a DIY
speaker with a raspberry pi. You use it to play music on. Perhaps even
with a higher quality DAC. The gist is that you have a linux-based
speaker that uses pulseaudio for playback.
Now you want to send an audio notification. What you would want to do is:
- Whatever is currently playing, lower it's volume
- Play the notification at a louder volume
- Resume to whatever was playing at whatever volume it was
Are there any ways that one can achieve the above with the current
pulseaudio version?
The following is a brainstorm! What I'm thinking is if it would be
possible to make a pulseaudio module that registers its own dedicated
sink. When audio is being sent to that sink then it would lower the
volume on the other sinks. When no more audio is sent the other sinks
get restored to whatever their level was. Audio played on this
"notification sink" is boosted a little. All these options should be
configurable. Would such a plugin even be possible in pulseaudio? I
guess I'm asking if a plugin has the capabilities to modify the output
of other sinks?
I'm looking forward to what you folks think.
Hopefully it's all already possible :) That sure is a million times
easier!
Best regards,
Mark