PulseAudio seems to be the default sound system for many linux distributions, including mine. I often have to look up the commands when I want to e.g. change output ot a different device, such as my big “TV”-screen. Pulse seems to be a very powerful system in terms of configurability, I won’t cover much of it. My interactions with Pulse is only as a desktop user.
Here’s a cheatsheet for controlling it via
pactl, the built-in commandline interface.
sinkis an output device (sound card, hdmi)
sourcean input device. I think. (microphone)
clientis the application playing some sound
streama currently active audio stream.
pactl list short sinks
For more verbose, skip
pactl list sinks
pactl set-default-sink <sink-name>
Note: changing this does not change currently running sound. You may need to restart the application to have the sound come through the correct sink.
pactl suspend-sink <sink-name> 1 # mute pactl suspend-sink <sink-name> 0 # unmute
pactl set-sink-volume <sink-name> 1.0
List active streams
pactl list sink-inputs
Copy ID of the stream into following command.
pactl move-sink-input <ID> <sink-name>
This should instantly move the stream without having to pause/resume. You can also use this to have different applications play on different devices. Pretty cool.
I didn’t try it, but I’m pretty sure you can set up a pulse server listening on network traffic, meaning you can stream sound to a different device. Cool stuff. Maybe in the future I’ll try it.