[PATCH] Dual Audio Output support for XBMC (Eden Updated)

  Thread Rating:
  • 18 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
THX-UltraII Offline
Fan
Posts: 324
Joined: Jan 2009
Reputation: 0
Location: the Netherlands
Post: #481
(2012-04-16 11:45)thica Wrote:  I am not sure about DTS-MA/True-HD and HDMI...
no ideas anyone?

Don't dream your life, live your dream
find quote
terr1 Offline
Donor
Posts: 21
Joined: Nov 2008
Reputation: 0
Post: #482
I need some help with this great patch.. using this patch on xbmc 10.1, now I want to update to xbmc 11.0 Eden.

I'm running Debian Squeeze.

So I downloaded the stable - xbmc-11.0.tar.gz source. Downloaded the xbmc-11.0-Eden-dualaudio-mod-source.zip.
Unpacked the xbmc-11.0.tar.gz in /usr/src/ and unpacked the mod-source.zip in /usr/src/xbmc-11.0/xbmc/ and overwrited the files.
Then made a new ./configure and make.

I'm getting the following errors:
LD xbmc.bin
xbmc/cores/AudioRenderers/audiorenderers.a(AudioRendererFactory.o): In function `CAudioRendererFactory::CreateFromUri(CStdStr<char> const&, CStdStr<char>&, bool)':
/usr/src/xbmc-11.0-mod/xbmc/cores/AudioRenderers/AudioRendererFactory.cpp:254: undefined reference to `CNullDirectSound::CNullDirectSound(bool)'
xbmc/cores/AudioRenderers/audiorenderers.a(AudioRendererFactory.o): In function `CAudioRendererFactory::Create(IAudioCallback*, int, PCMChannels*, unsigned int, unsigned int, bool, bool, IAudioRenderer::EEncoded, bool)':
/usr/src/xbmc-11.0-mod/xbmc/cores/AudioRenderers/AudioRendererFactory.cpp:172: undefined reference to `CNullDirectSound::CNullDirectSound(bool)'
/usr/src/xbmc-11.0-mod/xbmc/cores/AudioRenderers/AudioRendererFactory.cpp:200: undefined reference to `CNullDirectSound::CNullDirectSound(bool)'
xbmc/cores/paplayer/paplayer.a(PAPlayer.o): In function `PAPlayer::CreateStream(int, unsigned int, unsigned int, unsigned int, CStdStr<char>)':
/usr/src/xbmc-11.0/xbmc/cores/paplayer/PAPlayer.cpp:387: undefined reference to `CAudioRendererFactory::Create(IAudioCallback*, int, PCMChannels*, unsigned int, unsigned int, bool, bool, IAudioRenderer::EEncoded)'
xbmc/xbmc.a(SystemGlobals.o): In function `__static_initialization_and_destruction_0':
/usr/src/xbmc-11.0-mod/xbmc/SystemGlobals.cpp:51: undefined reference to `CAudioContext::CAudioContext(bool)'
collect2: ld returned 1 exit status
make: *** [xbmc.bin] Error 1

I can compile and use the unmodded version of xbmc 11.0 without any problems.

I also tried Paul's binary bin file (for ubuntu I guess) then I'm getting the following error:
/usr/local/lib/xbmc/xbmc.bin: error while loading shared libraries: libva.so.1: cannot open shared object file: No such file or directory

I have installed the libval package and the file does exists in /usr/lib.

How can I get past this? Really need this feature :/

EDITED:
Now it works no idea why.. played around with cpp and g++ version.. weird
(This post was last modified: 2012-04-22 00:00 by terr1.)
find quote
ReMi Offline
Member
Posts: 56
Joined: Nov 2004
Reputation: 0
Post: #483
After compiling the modified source i end up with a very large binary (10x larger !!!)
... by the way.. The binary works great (only a bit lip-sync issues)

-rwxrwxrwx 1 root root 155921499 2012-04-22 20:47 xbmc.bin (Compiled with Dual Audio Patch)
-rwxrwxrwx 1 root root 14493876 2012-03-24 01:25 xbmc.org (orgiginal version from xbmcuntu install)

I compiled using settings below
./configure --disable-ipv6 --without-libidn --disable-ldap --prefix=/usr

Is there a way to get the binary to it's normal size ?

Update: saved 30Mb .. still 105Mb to go...
-rwxr-xr-x 1 root root 120161194 2012-04-23 10:00 xbmc.bin (built with --disable-debug option)
-rwxrwxrwx 1 root root 14493876 2012-03-24 01:25 xbmc.org (orgiginal version from xbmcuntu install)
(This post was last modified: 2012-04-23 10:17 by ReMi.)
find quote
DeViLRuNNeR Offline
Junior Member
Posts: 9
Joined: Aug 2011
Reputation: 0
Post: #484
Any change of releasing an Apple TV version/mod for XBMC PaulCarter ?
find quote
PaulCarter Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #485
ReMi - your binary is big because you've not disabled debug. re-running ./configure with the --disable-debug should have brought it down to the same size as the orginal. Did you also do "make clean" after the configure? I always do that to ensure that everything is rebuilt.
I'm pretty sure that will work because I had exactly the same issue last week when I forgot the debug flag and got a huge binary.

DeVilRuNNeR - I could try cross-compiling for Apple TV but I don't have one so it would be entirely untested!
find quote
PaulCarter Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #486
I've just checked and unfortunately it's not possible to cross-(os-)compile from Linux to iOS. See this thread.
I'm afraid you'll need to find someone with a Mac to create this build.
find quote
ReMi Offline
Member
Posts: 56
Joined: Nov 2004
Reputation: 0
Post: #487
(2012-04-23 11:53)PaulCarter Wrote:  ReMi - your binary is big because you've not disabled debug. re-running ./configure with the --disable-debug should have brought it down to the same size as the orginal. Did you also do "make clean" after the configure? I always do that to ensure that everything is rebuilt.
I'm pretty sure that will work because I had exactly the same issue last week when I forgot the debug flag and got a huge binary.

It worked Rofl
"make clean" did the trick

Thanks !
find quote
armitatz Offline
Junior Member
Posts: 25
Joined: Nov 2011
Reputation: 0
Post: #488
resampling issues...

I installed the xbmc.bin with the dual output but I have sync issues. Specifically
When I see a video in youtube with 44100hz audio it plays correctly in the first output (hdmi) but in the second output it plays faster. The speed difference is even worst in videos at 22000hz. They play coorectly in the hdmi output (first) but twice the speed in the digital output (second). Off course they can't play correctly at the second output so they play with clicks and stops. Reversing the outputs (making first the optical and second the hdmi in the xbmc settings did not correct the problem).
I also made the following change to the advancedsettings.xml file
<audio>
<resample>48000<resample>
</audio>

It seems that the patch does not apply the same resampling settings at both outputs. They are being applied to the first output thus playing the hdmi stream correctly but it does not apply them in the second output thus resulting in corrupted audio in the second output every time it needs resampling.

Can anybody confirm this by doing the following check...
1. play a video of 44100 or 22000hz audio
2. check if it plays correctly (resampled) from both outputs

EDIT:
Found a solution...
I created this file
~/.asoundrc
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
period_time 0
period_size 1024
buffer_size 8192
#periods 128
#rate 44100
rate 48000
}
bindings {
0 0
1 1
}
}

and selected as audio device plug:dmixer instead of hw:1,0.( hw:1,0 was card1,subdevice 0 - my creative x-fi for digital). That made the digital output to resample everything to 48000.
(This post was last modified: 2012-04-23 19:06 by armitatz.)
find quote
scottw Offline
Junior Member
Posts: 1
Joined: Apr 2012
Reputation: 0
Post: #489
Hi there, I'm completely new to XMBC and this forum. I've downloaded Eden today and have it running on Mac OS X 10.6 on a Intel Core 2 Duo Mac Mini. I would really like to get the dual audio output working but have no idea how to compile the binary to work on my system. If anybody has an idiots guide to compiling for XMBC or can even post a link to a pre-compiled version I would be really grateful. I have checked as the thread but can't find this question posted anywhere-I apologise if this is a repeated request. Thanks very much, Scott
find quote
DeViLRuNNeR Offline
Junior Member
Posts: 9
Joined: Aug 2011
Reputation: 0
Post: #490
(2012-04-23 13:10)PaulCarter Wrote:  I've just checked and unfortunately it's not possible to cross-(os-)compile from Linux to iOS. See this thread.
I'm afraid you'll need to find someone with a Mac to create this build.

Thx for looking into it PaulCarter
find quote
sebion Offline
Junior Member
Posts: 24
Joined: Sep 2011
Reputation: 0
Post: #491
(2012-04-23 11:53)PaulCarter Wrote:  ReMi - your binary is big because you've not disabled debug. re-running ./configure with the --disable-debug should have brought it down to the same size as the orginal. Did you also do "make clean" after the configure? I always do that to ensure that everything is rebuilt.
I'm pretty sure that will work because I had exactly the same issue last week when I forgot the debug flag and got a huge binary.

DeVilRuNNeR - I could try cross-compiling for Apple TV but I don't have one so it would be entirely untested!

Hi PaulCarter,

I am really interested in having a kind of How To compile XBMC with this patch.
I tried many things without success.

I don't know lot of things on LINUX and compiling a program is still for me a nightmare, but I wanna learn..

Thank you in advance for helping me.

Regards,

S.
find quote
PaulCarter Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #492
sebion,
Have you followed the wiki article on how to get the source code & compile it on a Linux system?
That's the first thing to do - but note that you now need to work on the Eden branch as the trunk (master) is now heading towards Frodo.
To do that run the following command before you build:
Code:
git checkout Eden
Once you've got Eden built test it to make sure the process has worked!

Now, to create the dual audio version, create a new branch for you to use and switch to it:
Code:
git branch dualaudio
git checkout dualaudio
Then apply the patch file for the changes - which can be found here:
Code:
git apply xbmc.eden.dualaudio.patch
then rebuild everything
Code:
make all

And hopefully you now have your own build of xbmc with dual audio support Smile

Paul
find quote
schumi2004 Offline
Posting Freak
Posts: 1,344
Joined: Aug 2011
Reputation: 14
Post: #493
@Paul

Were did you get that patch from, It's to big imo.
I posted a patch in the past but that 1 was faulty, you need to do dos2unix to change the file format of the modified files.
And then create patch file.

The patch i have now is only 97kb which can be found here http://dl.dropbox.com/u/6696611/OpenELEC/index.html
(This post was last modified: 2012-04-27 13:41 by schumi2004.)
find quote
PaulCarter Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #494
D'Oh, More haste, less speed!
thanks Smile
Sorry, I forgot the sanity check - will sort it out later
find quote
sebion Offline
Junior Member
Posts: 24
Joined: Sep 2011
Reputation: 0
Post: #495
Thanks you, so much.

I do know how to compile xbmc. I already did it several times, but I didn't know how to apply the patch.
I will try this very soon.

How do you build this patch ?

Thanks
Seb
find quote
Post Reply