JACK, PulseAudio and Firefox: Enable JACK for firefox in the near future

11,982

I use the following script I call "pulsejack". Call it without arguments and it connects an existing jackd to PulseAudio. Called with any arguments, it starts up jackd with those arguments and then connects it to PulseAudio. Firefox can pick up from PulseAudio then.

#/bin/sh
if [ $# -gt 1 ]
then
    killall jackd 2> /dev/null && sleep 2
    jackd "$@" && sleep 2
fi
pactl load-module module-jack-sink channels=2
pactl load-module module-jack-source channels=2
pacmd set-default-sink jack_out
pacmd set-default-source jack_in

You may need to run sudo apt install pulseaudio-module-jack in order to get the respective modules.

Share:
11,982

Related videos on Youtube

user877329
Author by

user877329

Updated on September 18, 2022

Comments

  • user877329
    user877329 over 1 year

    Firefox bug #1345661 was closed with "WONTFIX", which certainly will break my current setup in the near future (I play firefox sound through alsa_in:loopback->JACK). I have read that Firefox has JACK support now, though it is not yet stable. Questions:

    1. Will JACK support in Firefox be officially supported?
    2. Will Ubuntu enable JACK support in Firefox before raw ALSA support ends?

    I the answer is No No, how can I reliable restore functionality without breaking JACK? It is possible to run PA through alsa_in, but I guess that would introduce some extra latency, break AV sync, or introduce signal distortion due to multiple resamplers.

  • user877329
    user877329 almost 7 years
    Mic presence detection? In the old days, there was no such thing. It was always "present" as an input jack on the soundcard, and it still is, on more professional stuff. Mine has 2 XLR connectors that can be used as either line or mic depending on gain. For JACK, it should just create input ports.
  • ravery
    ravery almost 7 years
    in firefox/adobe flash. hardware devices (alsa) only are detected. in chrome/pepperflash software devices (pulse and loopback) are also detected. I'm not sure what causes the difference.