• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 48
[Project] Dual Audio Output support (Nexus/Matrix/Krypton/Jarvis/Isengard/Helix/...)
Update History:
[08/08/2023] Added support for Nexus 20.2 and LibreELEC 11.0.3
[11/02/2022] Added support for Matrix 19.4 and LibreELEC 10.0.2
[01/11/2019] Added support for Krypton 17.6 and LibreELEC 8.2.5
[02/24/2017] Added support for Jarvis 16.1 and OpenELEC 7.0.1 / LibreELEC 7.0.3
[10/20/2015] Added support for Isengard 15.2 and OpenELEC 6.0.3
[04/19/2015] Added support for Helix 14.2 and OpenELEC 5.0.8
[10/18/2014] Updated to OpenELEC 4.2.1
[08/24/2014] Updated to Gotham 13.2
[06/06/2014] Added support for Gotham 13.1 and OpenELEC 4.0.4
[05/10/2014] Added support for OpenELEC 3.2.4
[04/17/2014] Initial support for Frodo 12.3 with new AudioEngine

Hi, for those who need 2-Zone simultaneous audio output might still remember the thread I posted years ago. This thread is to bring a new supporting feature for Frodo (and later) which is the first version to use the AudioEngine audio subsystem. I created this new thread also because of the totally different AudioEngine which makes the old patch inapplicable and it is a newly developed feature that is adapted to the AudioEngine.
  • The dual audio output support Kodi built-in video playback (VideoPlayer/dvdplayer) and music playback (paplayer) as well as the GUI sounds.
  • Game sounds (RetroPlayer) is now supported from the Matrix version.
  • Two audio output configuration are separated, the 2nd one can be enabled/disabled. Be aware that do NOT set 2nd audio output device same as the first output to avoid conflict.
  • All platforms should work as long as you have multiple sound output devices. I've tested on platform Windows and Linux (LibreELEC).

A screenshot of the second audio setting

Quite a few core source files needed to be modified to make this feature work which is a bit hacky, it's not considered to be a 'clean and decent' solution, thus there is the necessity to create a project to keep updating with the Kodi main project. Projects were created on github.

Kodi_dualaudio: https://github.com/xhbl/Kodi_dualaudio
LibreELEC_dualaudio: https://github.com/xhbl/LibreELEC_dualaudio
OpenELEC_dualaudio: https://github.com/xhbl/OpenELEC_dualaudio

Branches with name suffix '-DA' are the Dual Audio branches, e.g., Nexus-DA, libreelec-11.0-DA, etc. You can simply clone these repositories and pull the proper branch to compile your own build.

For those who want to have an instant try, I've built Windows and LibreELEC/OpenELEC(Legacy) Generic, RPi version for your convenience, For other platform versions, you'll need to build from the source code.
Anyone who build other versions and want to share, please feel free to PM or email me to put the resource link below.

20.2-Nexus Windows Installer: 64-BIT | 32-BIT | More...

11.0.3-LibreELEC Image: GenericGeneric-legacyRPi4RPi2More...

Legacy versions

Any suggestions for the future of this project, you are welcome to PM or email me. Enjoy!

It would be very interesting if you did decide to develop this for Gotham.

I have been looking for a dual-audio solution for some time. I need it so I can listen via the 5.1 speaker system while my wife who is hard of hearing can listen using cordless headphones.

I finally decided to use an Atlona AT-HD-M2C fed by a HDMI splitter. This solution isn't cheap and with the splitter means more boxes, more cables and more power supplies. Dual audio from XBMC would be a much neater solution.
Great stuff, been looking and following the old Eden post for a while now hoping for this to come to Frodo, well done on your hard work.

OK I tried the Windows version first. I set the first audio output to HDMI and 5.1, with the audio output device WASAPI. Second audio ouput to Analogue and 2.0, audio output device WASAPI - I had to scroll through these until I heard a sound in the headphones I had plugged in.

I played a 5.1 speaker setup test. The headphone output was perfect, all 6 channels audible and in the right place. However there was a problem with the 5.1 output - front and LFE were OK but I could hear the surround channels through the front right and left speakers as well as the rear right and left.

I will try the OE version later today.
OE fared better than Windows - I could get 5.1 to the speakers and a downmix to the headphones from lots of my test files, and all the channel placement was correct.

Unfortunately Frodo has problems that have been fixed in Gotham. If I bitstream the sound, Dolby TrueHD and DTS MA samples play at extremely low volumes (this may be an interaction between XBMC and my A/V receiver). If I send LPCM then most test files are OK but one I have which uses Dolby TrueHD has stuttering video and audio. And an irritation of OE 3.2 is that it doesn't work with my Logitech K400r cordless keyboard/trackpad. All these problems go away if I use a dev build of OE/Gotham.

I also noticed that the sound through the headphones was slightly ahead of that through the speakers. Watching actors lips suggest that the headphones are spot on and the speakers slightly behind, but it's so close that it wouldn't be noticeable in normal use unless you could hear both headphones and speakers at the same time.

So this is *almost* enough for me to forget about buying the Atlona box, but not quite. If the same patches were applied to Gotham it would be a different story - then I would definitely go for it.
How to install this patch:
3.2.4-OpenELEC: xbmc-122-DualAudio-OE324-r019.patch


Didnt noticed already compiled vweriosn of OE.
gotham on linux doesn't need an dual audio patch, you can do the same and more with the new pulse audio support.
Thank You wsnipex but i cant.
I installed gotham based openelec and with my stereo analog amplifier connected via optical and tv connected via hdmi i cant have two audio in same time. As i want to listen to music i have to change settings everytime after i watched tv. And vice versa. Thats highly unconvenient.
OE doesn't include pulse afaik. If dual audio on gotham is important to you, you might be better off with ubuntu or another normal linux dist.

It's there, it just not enabled in the build process (I didn't tested its usability)

nice, so its all there, but must be enabled during build.
Awesome work, xhbl. I've been annoyed at the extra hardware and various hacks I've had to use to get this functionality, so it's exciting to see this (and in Openelec as well, which is what I use!). Great stuff.
Adding my thank you as well. This feature is one of those must haves that I have missed since the Frodo release. I have since upgraded to Gotham for testing purposes so I am unable to take advantage of your work at present. Hopefully a Gotham release is in the not too distant future. Welcome back to the community!
welcome back xhbl.

sounds very promising to finally implement the desired solution for my htpc.

I have a question for this patch.

Is it possible to have on audio1 TrueHD or DTS-MA HDMI passthrough and on audio2 analog stereo at the same time?

  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 48

Logout Mark Read Team Forum Stats Members Help
[Project] Dual Audio Output support (Nexus/Matrix/Krypton/Jarvis/Isengard/Helix/...)9
This forum uses Lukasz Tkacz MyBB addons.