Kodi Community Forum
[PATCH] Dual Audio Output support for XBMC (Eden Updated) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: [PATCH] Dual Audio Output support for XBMC (Eden Updated) (/showthread.php?tid=86038)

- dsmuk - 2010-12-24

jbernardo Wrote:Can you try switching to a console and launch xbmc.bin by hand? It should complain of any missing libraries.

It does indeed throw up an error

Quote:./xbmc.bin: error while loading shared libraries: libmodplug.so.1: cannot open shared object file: No such file or directory

Have got to pop out so will have a play later but if anybody has any ideas?

- jbernardo - 2010-12-24

For libmodplug.so.1 you'll need to install libmodplug1. Tell us how it works afterwards.

- dsmuk - 2010-12-24

jbernardo Wrote:Can you try switching to a console and launch xbmc.bin by hand? It should complain of any missing libraries.

Thanks for that, finally got it working... and when I say working I mean just to load! Like you I have found the video stutters and so is unwatachable and have had to resort to the stock xbmc.bin

Along with having to install libmodplug1 it then asked for libssh-4

I was trying this out on a Revo 3610, with XBMCLive 10

- jbernardo - 2010-12-24

Mine is a POV MB (Atom 330 + ION), so without VDPAU it won't show HD properly.

- robertvg - 2010-12-28

azido Wrote:honestly, just 2 days ago i was thinking

"man, i would love to have the ability to have the gui sounds, standard audio (music as mp3) or better ANY 2-channel stuff being played by my analog device, while everything else having multichannel audio will be sent to my digital receiver - and all that without the hassle of manually changing the audio device in the settings"

..will this be possible with your patch?

edit: after thinking further, your patch seems to output audio to both devices simultaneously. how about this:

- user fills in the correct devices, one for analog, one for digital output in settings.
- an additional output "selector" with a corresponding onscreen-label (or simply a switch) will be available for skinners to implement into their skin.
- user can assing a key to that switch in keymap, thus making it available as a button on his remote.


based on what kind of audio the user wants to play (being 2-channel audio as an mp3, or being 5.1 sound of a movie, which can be easily determined by the proper flag of the video) the user can easily switch between audio 1 and audio 2 with a simple keypress. skinners could also implement the "audio switch" into the osd dialog so the user can decide which device to use for the currently running movie or episode based on the available audio sources.

in my dreams xbmc can decide which audio device to use as soon as the file is triggered to play without any user intervention beside setting those two devices up once in his setup (which of course would mean the audio device setup is kind of fixed like audio 1 represents an analog and audio 2 a digital device, else the whole idea becomes kinda useless).

So let me confirm: this patch will send all audio to two outputs simualtanously ? I would prefer (and really use Big Grin) a solution such as azido descibes above:
- config one audio output, to be used for audio (eg 2-channels)
- config another audio output, used by video (such as a 5.1 system)

- beenieman4355 - 2011-01-01

This saved my from spending about $20 on an external sound card. It's amazing how you can never have a unique problem in the age of the internet.
Thanks Alot!!

- bartdesign - 2011-01-01

This patch rocks! I've been waiting for this for a while now. Excellent!

- joblo10 - 2011-01-04

My first post in these forums to say thank for this!

I spent the whole last week trying to send audio to two different display over an monoprice HDMI matrix switch without real success... With your modifications, I've been able to drop that switch and I'm now only using the two ports of my video card to feed these two display, in clone mode.

This works perfect for me! It even gives me 8 channels LPCM to my av receiver while at the same time output basic two channel audio to my Sammy.

Thanks for your effort! I hope this will make its way to the main branch.

XBMC Dharma, Win7, Geforce 430GT
Denon 2808CI / Samsung LN46A550

- Pmurphy2803 - 2011-01-06

UPDATE: So I removed my external sound card and connected my audio connections directly to the Acer Revo 3700. Turns out this works to output (over analog and spdif) JUST FINE this way, but only while playing music and navigating menus. If I try to play movies though, I get an "failed to initialize second audio device" error message (and the second device always is the spdif output). Anyone have any ideas? Much appreciated..

- erhnam - 2011-01-06

The package seems to be corrupt:

gzip: XBMC-10.0-linux-DualAudio.tar.gz: not in gzip format

- h.udo - 2011-01-06

Works fine here.

tar xvzf XBMC-10.0-linux-DualAudio.tar.gz


- tequila - 2011-01-07

Oh great, finally a solution for my beamer/tv setup. DidnĀ“t try it yet but will soon. Someone who already made the coax/optical working parallel with the hdmi on a POV ion (Revo probably the same) ?

- Fiasco - 2011-01-09

This is awesome. I'm running a single XBMC box on two screens. The main room is optical/hdmi and the rear room is zone 2 of the receiver which is analog only.

I always hated switching back and forth.

thank you.

- elitegamer360 - 2011-01-09

Works Great, Thank you. Big Grin


- nessus - 2011-01-11

This is working fine with one little problem.

I set the FIRST audio output to optical/coax and audio output device to Direct Sound Digital (7.1 AV Receiver) and the SECOND audio output to analog and audio output device to Direct Sound Speakers (PC Stereo Spekers). When i play video files (mkv) with AAC 5.1 codec there is no sound or video in XBMC at all. No freezing or crashing of XBMC, just a black no sound screen.

Now... when i change the optical/coax to HDMI, everything is back to normal and the sound and video plays fine. This can be done on the fly whiteout any problem. No need to go to audio settings.

So the working settings for me are :

Audio Output : HDMI
Speakers Configuration : 7.1 Cannels
Audio Output Device : Direct Sound Digital

Audio Output : Analog
Speakers Configuration : 2.0 Cannels
Audio Output Device : Direct Sound Speakers

XBMC Dharma 10.0 Final (r35647)
Windows 7 Ultimate 32bit
Realtek High Definition Audio (integrated)
Nvidia 8600GT

Tested with video files with AC3 5.1, DTS 5.1, DTS 7.1, AAC 5.1, & MP3 codecs and everything working fine (DVXA2 ok), although XBMC is still outputs 2.0 channels from video files with AAC 5.1 channels codec. Is that right or am i missing some settings in XBMC ?. Can somebody confirm this ?.