Streaming audio to multiple outputs can be a useful feature when working with Ubuntu Linux. Pulseaudio, the default sound server in Ubuntu, makes it possible to stream audio to multiple devices simultaneously. In this article, we will show you how to stream audio to two outputs with Pulseaudio on Ubuntu Linux. One output will be wired speakers and the other will be Bluetooth headphones connected to the Plugable USB-BT4LE.
This is useful if you wish to stream audio to Bluetooth speakers in another room. The speakers will be need to be within 10 meters (32 feet) from the computer. Note that there could be signal interference caused by building materials.
Note that you can only stream to one Bluetooth device at a time. You would need a Bluetooth splitter device to send audio to two different Bluetooth speakers.
- Ubuntu 20.04 - 22.04
- Pulseaudio (usually installed by default
- Bluez Bluetooth stack (usually installed by default)
- Plugable USB-BT4LE
- Bluetooth speakers that are paired and connected to the computer
- Wired speakers connected to audio out / headphones jack on the computer
If you want to play audio on multiple devices at the same time on your computer, you can use a program called paprefs.
First, you need to install it by opening a terminal and typing:
sudo apt install paprefs
Once installed, type paprefs in the terminal and select the Simultaneous Output tab.
Check the box that says Add virtual output for simultaneous output on all local sound cards. This will create a new audio output device that allows you to play sound on multiple devices at once.
To select the new audio output device, open the "PulseAudio Sound Preferences" menu (pavucontrol) and go to the "Output" tab.
Or, type in pavucontrol at the terminal
You should see the Simultaneous Device. Set it to be the default.
In this example, it's set for the wired speakers (Built-in Audio Analog Surround 2.1) and the Bluetooth speaker (Samsung Home Audio Soundbar)
If pavucontrol isn't available, you'll need to install it:
sudo apt install pavucontrol
If you need to restart PulseAudio to make the changes take effect, you can either log out and back into your session or type pulseaudio -k into the terminal. This will stop and restart the PulseAudio daemon.
You should now have audio streaming to both the wired speakers and the Bluetooth speakers. You may experience audio lag with the Bluetooth speakers but this is normal.