Play sound through two or more outputs/devices

I think this is a pretty simple concept. I have one sound card and one pair of bluetooth headphones. I want to play my audio through both my sound card and my bluetooth headphones.

I believe Windows has checkboxes allows you to "check" outputs to enable/disable them, but Ubuntu seemingly has the equivalent of radio selectors (you can only select one at a time).

Bonus Question: On a similar note, I have 5 analog output channels on my sound card (in addition to my digital & HDMI audio) -- I would like to be able to determine what comes out of each of those ports (e.g. "front speakers" on all 5 or "front", "center", "back", etc).


With paprefs you have access to a virtual output device that enables simultaneous output to all attached sound cards/devices:

sudo apt install paprefs 

Then in terminal run paprefs, select "Simultaneous Output" tab, and check "Add virtual output for simultaneous output on all local sounds cards".

paprefs

The additionally created audio output device for simultaneous output may be selected in the "Output" tab from pulseaudio sound preferences menu:

enter image description here

In this example it is shown for a HDMI-device but as soon as your Bluetooth device is recognized it will also be available for simultaneous output.

The changes may need a restart of pulseaudio to take effect either by logging out and back in to your session or by running pulseaudio -k in a terminal.


In case paprefs does not do the job or if you prefer to have paprefs not installed use this command from the command line:

pactl load-module module-combine-sink

To unload the module from command line and reset pulseaudio to defaults just restart pulseaudio with pulseaudio -k or issue

pactl unload-module module-combine-sink

Ubuntu

I've just confirmed this solution (from 4 years ago) still works on Ubuntu 14.04 LTS.

Install

Open terminal and type sudo apt-get install paprefs go to the tab exactly as per the picture above and select the option.

Initial Run

Then; remaining in terminal, type pulseaudio -k to kill and restart pulseaudio.

Then go to your sound settings and you will see the option to output to multiple sound devices.

Props to whoever wrote paprefs it's a brilliant little piece of software I would actually like to see included in Ubuntu without requiring additional installation.

Apple Macs OS X

A similar solution is available via an included piece of software and whats so great about pulseaudio is that the sound seems to be perfectly in-sync from both outputs so it must be adjusting for the lag as well which is why its so impressive; otherwise we would be hearing a slightly delayed version from one output and another.


In Kubuntu 18.04, Plasma 5.12 paprefs is not needed, as a similar setting is already there:

enter image description here

A new output option should become available after reboot, called “Simultaneous output”.

enter image description here

Or in pavucontrol:

enter image description here


In 18.10 with Plasma 5.13.5 that “Simultaneous output” option has been removed, so paprefs is needed.