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

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



[PATCH] Dual Audio Output support for XBMC (Eden Updated) - xhbl - 2010-11-24 10:57

Refer http://forum.xbmc.org/showthread.php?tid=192480 for support of Frodo and later.
----------------------------------------------------------------------------------------------


I developed Dual Audio Output support for XBMC

Hi, I need two audio output simultaneously, One for AV receiver, one for TV analog audio input. So I developed Dual Audio Output support for XBMC.

How do you think this feature? Is it usable? Smile

Currently the GUI sound only output to original first device.

[Image: XBMC-DA-0e.jpg?psid=1]
Add TWO Audio Output support, thus you can use the 2nd output device of
the sound card (e.g., S/PDIF and analog) or use another sound card for
simultaneously output. The 2nd audio output can set to disabled.

[Image: XBMC-DA-1e.jpg?psid=1]
For example, you can set the original output to Analog 2.0 so it can be
connected to a TV, Speaker or Earphone, etc; Set the 2nd output the AV
Receiver using Opical/Coax S/PDIF passthrough mode. COOL?

[Image: XBMC-DA-5e.jpg?psid=1]
Screenshot under linux


[Image: XBMC-DA-2e.jpg?psid=1]
Both output for music playback.


[Image: XBMC-DA-4e.jpg?psid=1]
Both output for video playback.


I build a Windows DirectX version, binary patch files are shared:

10.1-Dharma Final:
Windows(DirectX): XBMC-10.1-dx-DualAudio.zip
Other OS Platform: Pls build from the modified source files below by yourself :-)
11.0-Eden:
Windows(DirectX): XBMC-11.0-dx-DualAudio.zip
Other OS Platform: Pls build from the modified source files below by yourself :-)


I only release the Windows binary file XBMC.exe for downloading, you can install a corresponding XBMC version and use this XBMC.exe to simply overwrite.
I do not have other OS enviroment, so I do not build other OS version binary. Please build from the source by yourself. If anyboby wanna build and upload somewhere and give me the link, I'll be glad to put the link here.

Under windows, you'd better both select Directsound deivces or select one Directsound and one WASAPI device, you can not both select WASAPI devices because only one WASAPI device is permitted in a windows process.

The full modified source files are here(Not a diffed patch file, simply extract and overwrite original before build):
10.1-Dharma: xbmc-10.1-dualaudio-mod-source.zip
11.0-Eden: xbmc-11.0-Eden-dualaudio-mod-source.zip

History:
--------------------------------------------------------
Changed: (Mar. 25, 2012)
Update to the 11.0-Eden. Windows binary patch and full modified sources are provided. Pls build the binary using the modified sources by yourself under other OS platform.


Changed: (Apr. 1, 2011)
Update to the stable 10.1. Windows binary patch and full modified sources are provided. Pls build the binary using the modified sources by yourself under other OS platform.

Changed: (Mar. 7, 2011)
Patch is updated to v7 for master r0222318 (2011/3/7), Previous patches for SVN are obsoleted. linux binary patch will not be built from now, you might build it from source patch by yourself.

Changed: (Dec. 21, 2010)
Patch is updated to v6 for SVN 35662 and XBMC 10.0 Dharma final release version, Previous patches are obsoleted. both windows and linux binary patches are available for download

Changed: (Dec. 04, 2010)
Patch is updated to v5 for SVN 35575 and Dharma RC2, Previous patches are obsoleted. both windows and linux binary patches are available for download

Changed: (Nov. 29, 2010)
Fixed a fatal memory error which will crash XBMC while playing music, Patch is updated to new(v3), Previous patches are obsoleted. Also Dharma patch is provided.

Changed: (Nov. 27, 2010)
I have changed the mothod for fixing out of synchronization problem of the 2nd audio output for video playback, Patch is updated to new, the previous patch is obsoleted.


- spiff - 2010-11-24 11:16

that settings screen is way way too busy. and ^^ better include sources Smile

i think feature would be welcome but it needs a better ui. i would suggest creating a dialog


- xhbl - 2010-11-24 11:23

spiff Wrote:that settings screen is way way too busy. and ^^ better include sources Smile

i think feature would be welcome but it needs a better ui. i would suggest creating a dialog

Well , the GUI settings screen is a temporary expedient based on the original.
And how do I post the sources? I am a freshman here. Smile


- spiff - 2010-11-24 11:27

make a patch, and link to it. distributing a binary without the sources is a gpl violation.


Very cool feature indeed!!! - Voyager - 2010-11-24 12:06

Big Grin

I can finally get rid of those "profiles" to switch between TV and Receiver settings... I can't wait to try it out in my custom build tonight. Thanks so much for the great work.


- xhbl - 2010-11-24 12:09

Ok, the patch file link is updated


- spiff - 2010-11-24 12:12

cheers


- Bas. - 2010-11-24 13:27

Finally! This is so annoying on a windows machine. I love you! Big Grin

Going to test this tonight.


- Montellese - 2010-11-24 13:31

Looks nice.

How about changing the settings screen in a way that you have an "Audio Output" selector at the top and then you can switch between "Audio Output 1" and "Audio Output 2" and only see the configuration for the selected output? This would clean things up alot.


- garyi - 2010-11-24 23:15

Would this mean I can pick a USB audio output for music and standard optical output for film/video?

That would be seriously, no seriously.


- Sylus - 2010-11-24 23:46

nice one. finally


- Bas. - 2010-11-25 10:50

Is there an other way to download it besides emule?

Or some explination how I also can use this in future versions?


- spiff - 2010-11-25 11:11

he posted that patch, what more do you needConfused


- Bas. - 2010-11-25 13:58

I'm a complete newbie in this, but how can I apply that patch to my existing installation then? Manually hacking the changes into the files?


- spiff - 2010-11-25 14:04

uhm, a patch applies to the source code. you use a suitable tool such as 'patch' on linux/osx, or uhm, whatever is avail on windows.