#/usr/bin/env bash
current_time_seconds = $(date +%s)
for VARIABLE in 1 2 3 4 5 .. 10
do
pid=`ps -ef | awk '/pulseaudio/{ print $2 }'`
kill $pid
done
This is my bash script that just kills the pulse-audio process. Unfortunately, both my browser and musicplayer share the same process id. How do I kill the sound just for the browser, for lets say 10 seconds.
Pulseaudio treats each application as a separate client and gives each its own stream (“source”). You can use
pactlto list clients, devices (“sinks”) etc., and you can also use it to get/set their properties, such as their volume. There is even a convenient command to mute/unmute a source. Good luck!