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 44 45 46 47 48
Thanks @DarkAngel2401
I don't know how can I build this, if you send me instructions, I will try.
The testbuilds are located at: http://forum.kodi.tv/showthread.php?tid=231092
The latest one now is build #0731, located at: http://forum.kodi.tv/showthread.php?tid=...pid2068218

Can you please look at this, how can your patch be added to the build #0731? It would be great to know that I could do it myself, since these builds are released quite frequently, and then I could build the never ones myself, and could post it here if somebody needs it.
These testbuilds are so good, I'm using one atm, they are working perfectly, sure there are some bugs, but the work done compared to the stable versions is enormous, deinterlacing is brilliant!
You have to apply these patches to source files, not the binaries.
Is there a repository of those testbuilds available (containing the source files)?
Can you ask @Milhouse as he is maintaining these build, I'm in learning process to do these things.
Errmmm, I rly doubt if Milhouse wants to include that patch as he don't know which files are modified, where to pay attention, and so on. Same is for me with Milhouse's used source code and modifications.

If you have some C / C++ knowledge, you can do that job, but you have to spent some time (more than just a few hours).
The patches I use almost all come from git repositories. All the build details are included inside each build tar, along with some information on how my build process works (based on the standard OpenELEC build process, augmented with "profiles"). Obviously there would need to be an Isengard or Jarvis version of this DA patch (depending on whether you're building stable/Isengard/15.x or master/Jarvis/16.x).
Thanks guys, I hope it clears things up. I'm afraid I don't have any C knowledgeSad
It would be great to have a DA version of 16.x (I guess that is the latest version where the excellent deinterlacing job is done, the builds I was initially referring too?).
(2015-08-01, 17:01)DarkAngel2401 Wrote: [ -> ]Errmmm, I rly doubt if Milhouse wants to include that patch as he don't know which files are modified, where to pay attention, and so on. Same is for me with Milhouse's used source code and modifications.

If you have some C / C++ knowledge, you can do that job, but you have to spent some time (more than just a few hours).

Not only that, but unless DA is likely to be merged into Kodi or OpenELEC in the near future then it won't be included in my test builds as these are for gaining early access to already merged or soon-to-be merged features.

If DA had a pull request on either Kodi or OE repositories that looked promising (ie. received positively by other developers and likely to be merged in future), then I could/would include it.
As this dual audio patch is "only" a quick and dirty hack (duplicating audio engines), it would never find it's way into official Kodi / OE code. If ever dual / multi audio output is included officially, it would need some complete rewriting of audio handling, which will be far beyond that quite easy patch.
Since Isengard had been just released, it would be a great time to include dual audio support for Kodi 16 development. This is a great feature, used by many of us, and it would be very nice to have this in master. I understand the way it is done now is not a "nice" solution, but I'm sure it can be done in a way that it could be included in master branch. Whom should we contact about this?
And yes, maybe it is not nice solution, but it works great, I have been using these builds for long time now, and never ever had any problems with it.

Was there any discussion about this already?
Someone from the official kodi team (or at least more or less active member, I don't remember) posted his statement about that patch in this thread: Dual audio (or more generic: multi zone audio) is used just by a few people, so if we want that feature to be integrated as an official feature it has to be implemented in a more common way (as an audio plugin or rewriting the audio engine, but multiple audio zones aren't always using the same features (common frequencies, speaker setups, etc.), so this is more than just a weekend of adjusting some lines of code.

In other words: This feature won't be implemented (ever ?) by the official team members. The only way it will be integrated is a clean, generic, proper scaling ready-to-use solution beside the normal development process.
For me dual audio is essential, I'm so grateful for your work DarkAngel. Surly anyone that wants to swap easily between playing audio through a quality hifi setup or just watch video on the TV (without having the hifi on) needs DA? Are there really so few of us that care about audio more than TV? If I can sign up somewhere to register interest please tell me.

Lack of official interest is so disappointing, and I understand that without that there is no point trying to raise a PR etc.

You mentioned uploading code patches. What parts of Kodi does dual audio effect, or is it OE? I remain confused about where one stops and the other starts. I can read C, and I have clonned Isengard off Github to have a look at improving classical music handling (yet to discover if I will be able to receive offical support), so what is the dual audio dirty fix like?

Happy to get my hands dirty if I can help support this feature.
Main work on dual audio comes from xhbl, for OpenELEC he just provides the Generic.x86_64 binary package.
I just expand the patch for RPi / RPi2 OpenELEC sources and build all OpenELEC binaries instead of just the one xhbl does. I also do some patch tweaking for building all the beta releases of OpenELEC.
So it is just OpenELEC code that gets changed? Had a quick look at the xhbl Github repository, that seems to branch from Helix making me think that say an Isengard version of dual audio would need similar changes to the code. Haven't gone digging in OE yet, maybe a step too far for now!

Do you have a list of code files (Kodi and OE) that get changed for dual audio I could have a glance at, might make things clearer.
(2015-08-06, 15:25)DaveBlake Wrote: [ -> ]Lack of official interest is so disappointing, and I understand that without that there is no point trying to raise a PR etc.

Kodi is an open source project that means that a new feature does not need "official" interest to be implemented. Anyone can do it. But as we mentioned several times: we won't integrate code that is not done properly.

I think I have already mentioned the biggest flaw of this code here. You need to find a solution how to make a/v sync working for multiple audio devices. Feel free to ask questions, I am happy to help.
@DaveBlake I fully agree with you and sometimes I also wonder how could it be that there is no more interest for this option. Those of us who use it can't imagine to do without it, and I guess many users just don't know something like this is possible at all. If I could vote for a new feature upgrade for the next Kodi release, that would be certainly this (and that includes at least 5 of my friends).

I'm glad that you also like this feature and that to my understanding you have the proper knowledge to implement this in a required way, or at least you will look at it.
I understand the hardest part will be to make a/v sync working on multiple audio devices, as FernetMenta and fritsch already explained. Lets hope it is possible, fingers crossed!

I don't know about others, but I never use the two audio outputs for the same stream, or as a matter of fact, I never use two audio devices at the same time, so for me a/v sync is not a concern at all. I use this feature as the following:

Scenario1): Audio output 1 configured as HDMI, connected to my stereo TV. If I don't need my amp (like watching news, a cartoon for kids, or late at night when I can't use the amp) I just use my tvs speakers, amp being turned off.

Scenario2): Audio output 2 configured as SPDIF passtrough, connected to my amp. I use this when I watch content with DD/DTS and I would like to use my amp, then I just mute the TV. And more importantly, I use this without TV even turned on for listening to music, as why would I keep my 42" plasma turned on when I listen to music? I use my phone/tablet to control and play music, playlist, etc., working extremely well.
Not to mention an RPi with HiFiBerry analogue DAC or optical, we who prefer good old stereo amps for music can have this from the pi, while we still don't miss on digital sound for movies, etc, obviously connected to TV or a newer surround amp.

This makes my htpc running Kodi my central entertainment system, and with DualAudio it is doing the job magnificently.

I keep thinking what purpose there would be to have simultaneous audio output for the same content, when a/v sync would really be an issue? Of course, some might use different scenarios.

In hope the project keeps going and will make it to Kodi master onceSmile
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 44 45 46 47 48