Kodi Community Forum

Full Version: [Project] Dual Audio Output support (Krypton/Jarvis/Isengard/Helix/Gotham/Frodo)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
Update History:
[03/13/2017] Added support for Krypton 17.0 and LibreELEC 8.0.0
[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 this thread I posted years ago:

Now I'm back to bring a new supporting feature for Frodo(and later) which is the first version to use the powerful AudioEngine audio subsystem. I created this new thread also because of the totally different AudioEngine which makes the old patch inapplicable and this is a newly developed feature that is adapted to the AudioEngine.

The initial development of this project was under the support of lallhands in this forum. Thanks to him for encouraging me to start this project.

Currently Krypton/Jarvis/Isengard/Helix/Gotham/Frodo are supported, Different code are developed for them respectively. Be aware to pull the proper branch if you do your own build.

[Image: XBMC-DA-8.jpg?raw=1]
A screenshot of setting in Krypton

[Image: XBMC-DA-7.jpg?raw=1]
A screenshot of setting in Jarvis - Gotham

The dual audio output support Kodi built-in video player (videoplayer/dvdplayer) and music player (paplayer) as well as the GUI sounds. I've tested with the Windows and OpenELEC build and seems to be working well. as I mentioned above, in Gotham and later version, AudioEngine has been refactored to ActiveAE, so for Frodo, I only focused on the SoftAE which would support Windows WASAPI/Directsound and Linux ALSA/OSS. Although I implemented code for PulseAE/CoreAudioAE, it's mainly for passing the compiling. for Gotham, since AudioEngine had been refactored to a unified ActiveAE, all platforms should work.

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: https://github.com/xhbl/Kodi_dualaudio
OpenELEC: https://github.com/xhbl/OpenELEC_dualaudio
LibreELEC: https://github.com/xhbl/LibreELEC_dualaudio

Branches with name suffix '-DA' are the Dual Audio branches, e.g., Krypton-DA, openelec-8.0-DA, etc. You can simply clone these repositories and pull the proper branch to make your own build.

For those who want to have a instant try, I build windows(only Kodi.exe[XBMC.exe before Helix], you need to install the original and replace exe file with this, for versions after Frodo, addtional xml setting files need to be replaced) and OpenELEC Generic 64bit version for your convenience:

12.3-Frodo (Windows DirectX): XBMC-12.3-dx-DualAudio-r019.zip
13.2-Gotham (Windows DirectX): XBMC-13.2-dx-DualAudio-r019.zip
14.2-Helix (Windows DirectX): Kodi-14.2-dx-DualAudio-r017.zip
15.2-Isengard (Windows DirectX): Kodi-15.2-dx-DualAudio-r020.zip
16.1-Jarvis (Windows DirectX): Kodi-16.1-dx-DualAudio-r015.zip
17.0-Krypton (Windows DirectX): Kodi-17.0-dx-DualAudio-r015.zip

3.2.4-OpenELEC(Generic_x86_64): OpenELEC-Generic.x86_64-3.2.4-DualAudio-r019.tar
4.2.1-OpenELEC(Generic_x86_64): OpenELEC-Generic.x86_64-4.2.1-DualAudio-r019.tar
5.0.8-OpenELEC(Generic_x86_64): OpenELEC-Generic.x86_64-5.0.8-DualAudio-r017.tar
6.0.3-OpenELEC(Generic_x86_64): OpenELEC-Generic.x86_64-6.0.3-DualAudio-r020.tar
7.0.1-OpenELEC(Generic_x86_64): OpenELEC-Generic.x86_64-7.0.1-DualAudio-r015.tar
OpenELEC(builds by DarkAngel2401): OpenELEC-DualAudio-builds-by-DarkAngel2401

7.0.3-LibreELEC(Generic_x86_64): LibreELEC-Generic.x86_64-7.0.3-DualAudio-r015.img.gz
8.0.0-LibreELEC(Generic_x86_64): LibreELEC-Generic.x86_64-8.0.0-DualAudio-r015.img.gz
LibreELEC(builds by DarkAngel2401): LibreELEC-DualAudio-builds-by-DarkAngel2401

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

DONATE to this project [Image: btn_donateCC_LG.gif]
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.
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?

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
Reference URL's