PulseAudio is great. PulseAudio just works. But for Real Musician Stuff, as well as for any kind of audio routing, you need JACK.
Problem: Not every program that supports audio supports JACK. So you can't just switch to using JACK and have everything work.
There's a lot on the web about using JACK with PulseAudio, but here's what worked for me:
- Install qjackctl (if you're using JACK, you probably want this anyway)
- In qjackctl, go to Setup → Options
- Check "Execute script after Startup:" and put:
pactl load-module module-jack-sink channels=2; pactl load-module module-jack-source; pacmd set-default-sink jack_out
- (You might need to install pulseaudio-module-jack)
- PulseAudio seems to use way too much RAM with this running (ca. 10–15MiB without, 500MiB–1GiB with). I don't know why it does this, and it can be a problem on an older PC with not that much RAM. At any rate, to fix this after JACK is stopped, I check "Execute script after Shutdown:" and put:
pulseaudio --kill && pulseaudio --start
There. Now you can turn on JACK without worrying about not being able to play audio from Firefox. You can even route JACK applications to the PulseAudio audio sink, which I've used in a Jitsi Meet call to great effect.
One problem I have noticed is that Firefox in particular has an unusually low output volume. This can be compensated for by running the PulseAudio sink through something like zita-mu1.