Kodi Community Forum
[Project] Dual Audio Output support (Krypton/Jarvis/Isengard/Helix/Gotham/Frodo) - 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: [Project] Dual Audio Output support (Krypton/Jarvis/Isengard/Helix/Gotham/Frodo) (/showthread.php?tid=192480)

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


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - DaveBlake - 2015-08-09

(2015-08-08, 20:36)wisler Wrote: Using multiple audio devices would be really cool. I also searched for a solution and alot of people say it is not possible to sync them via software. If you search in the internet there are some hardware modders, which synced two audio cards with one crystal.

For example I would use two audio devices to get more channels for playback. A other feature would be multi zone support. One audio device for watching a movie. The other for listening to music in a different room.

(2015-08-08, 22:42)Chessie Wrote: In my case, and I'd be curious as to how many other people who use the DA code for the same reason, it's to send audio (music) through out the house and outdoors. I have one amp for my main TV viewing area and a second amp that connects to in-ceiling speakers in every room and outside around the pool. In most cases, modern amps that support zone 2 speakers will not allow the same digital audio stream to both zones at the same time. (Unless they do some tricks like Yamaha's Party Mode amps.) So the DA code allows me to send my play list music to both amps and I then have music though out the house. Works perfectly in my case. Without the DA code I'd probably have to get rid of my fairly new Pioneer Elite and buy a new Yamaha with Party Mode.

How are people using DA (as flawed an implementation it may well be)?


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - AchimTuran - 2015-08-09

(2015-08-09, 11:59)DaveBlake Wrote: I get that if you want it you have to do it yourself (if you can), I also know that software takes time and effort, got the grey hair to show for it!

But it would be nice to have a little more feedback that "no, no, no it can't be done this way". Right now I am regretting even asking, it seems that people were upset before I started. From working as a senior member of large teams, I am used to having to explain my designs to others, share my knowledge of a project so that they can contribute. I can never just say "no, no, no" no matter how silly the suggestion, but in Opensource I guess it is different, there you just get a mountain of code to read (if you have the time).

I'm one of the developer from AudioDSP and I'm not upset. As Fernet wrote, we maybe have a language problem here.
I really like the idea with more sinks and e.g. the use with multizone support.
If I had the time and no other project had a higher priority I would help to implement it or start the project on my own. But currently the ADSP add-ons are not usable and I'm focusing on this project. Also the AudioDSP System is very new and needs a better integration.

On hand no one can estimate your knowledge or what questions do you have. On the other hand it is very hard to find the first steps. I had the same problems with the convolution engine.

So here are some good starting points:
At first read the wiki page about AE:
http://kodi.wiki/view/AudioEngine

After that you can watch the presentation about ActiveAE from a DevCon:
https://www.youtube.com/watch?v=_78YxAXQyBg

Then you can start reading the code from our AudioEngine here:
https://github.com/xbmc/xbmc/tree/master/xbmc/cores/AudioEngine

A good starting point is the interface implementation:
https://github.com/xbmc/xbmc/tree/master/xbmc/cores/AudioEngine/Interfaces

Or just start with our factory implementation:
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/AEFactory.h

After that you should see why we are not just duplicating the object. It's a design pattern (sorry Fernet I don't remember the name).


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - AchimTuran - 2015-08-09

(2015-08-09, 12:05)DaveBlake Wrote: Using multiple audio devices would be really cool. I also searched for a solution and alot of people say it is not possible to sync them via software. If you search in the internet there are some hardware modders, which synced two audio cards with one crystal.

For example I would use two audio devices to get more channels for playback. A other feature would be multi zone support. One audio device for watching a movie. The other for listening to music in a different room.

Currently I don't use the DA patch and I only read the thread to see the development about it.Blush And I hope there is someone like you who is willing to start the project in a better way.


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - DaveBlake - 2015-08-09

(2015-08-09, 13:19)wisler Wrote: So here are some good starting points:
...
After that you should see why we are not just duplicating the object. It's a design pattern (sorry Fernet I don't remember the name).
Many thanks Wisler, I'll do some reading.

I am more than willing to contribute what I can to such a great project as Kodi, finding time may be more of a problem of course. It does help to have a starting point.


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - DarkAngel2401 - 2015-08-10

As I mentioned before the actual patch is a working, but very dirty solution. I would absolutely prefer a clean implementation of dual/multi zone based on the underlying AE without simply duplicating code. For now I provide just ready-to-use builds for OpenELEC, even for beta versions.

Implementing dual/multi zone the 'right way' would just be a new project. And it is consuming too much time which I don't have for now.


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - gurabli - 2015-08-10

A little bit off topic here, but maybe some of you have already tried this (or perhaps would like to try).

HDMI audio extractor > HDMI, optical, 2ch analogue
Link

According to the description, it extracts audio stream from hdmi input, and it can do 3 things:

1) passtrough -- nothing is done, just hdmi in to hdmi out
2) 2ch -- audio is extracted from hdmi input to and sent in 2ch stereo (obviously) to hdmi out, optical, and 2xrca (wonder what DAC is used and the quality, nowadays there are very nice surprises with very high quality DACs used in cheep devices from China)
3) 5.1 -- audio is extracted from hdmi input, and send to optical and hdmi out, no analogue. The optical supports DD 5.1 and DTS.

I'm considering one of these, as it would solve my scenario, as the 5.1 mode would be perfect to have audio at the amp and tv too, while the 2xRCA for stereo amp

Of course, there are many questions:

-- is the audio extracted to optical if tv is turned off, will it work then?
-- what is the quality of the whole thing, what are the limitations, if any?

Has anyone tried this already? The price is really low, so might be worth a try.


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - Memphiz - 2015-08-10

@DaveBlake - i think the time problem also holds true for the most of our team developers - this includes the time for explaining the design to other developers Wink. Also that whole AE code is written in a very readable manner imo. Even i was able to dig through it.

In a short:

2 Threads:
1. the AudioEngine Thread implemented in the AudioEngine subdir (its a state mashine pattern)
2. the AudioSink Thread implemented in the sinks subdir
3. Communication between Engine and Sink via Ports and Signals ( combined into a Protocol class - i think this all is based on an actor pattern)

At any time you have 1 Engine + 1 Sink - Engine can have converters in between before feeding data to the sink. Sink is the abstraction of the audio output interface and needs to ensure to 0. Provide available audio devices, 1. Provide available formats to the engine, 2. configure the output device to accept audio data in a specified format, 3. feeding the engine data to the output device.

Everything else is in the code really (i know there are developers around which are not used to dig into others code, not sure which sort of development you face normally - i don't do anything else for my day work tbh ...)


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - DaveBlake - 2015-08-10

Since I never listen to both outputs at the same time, it dawned on me that rather than dual audio all I really need is an easy way to change the standard audio output settings from one set of parameters to another. By "easy" I mean without the TV being turned on, without menus to navigate, and to able to do it remotely as well as from the keyboard attached to my RPi.

Then I read this how-to thread and had a light-bulb moment. Smile
I can use JSON commands to swap the audio device parameters. HTTP the right line of code from a web browser and it switches. All I have to do now is somehow put a nicer UI on this. Something to capture the settings, and something to run a Python script in response to a key press or icon click on my Android tablet etc. Maybe some kind of addon? Bit vague on those aspects for now.

Now this approach is not going to help those DA users that want to have multiple audio outputs simultaneously, sorry about that. But Gurabli it will replace the way that you are using DA, so that's 2 of us that could move back to official Kodi.

Edit: Such an addon already exits! See Audio Profiles. Hope the link helps people in the future - don't use dual audio if you don't need to. Smile


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - gurabli - 2015-08-10

It sounds very exciting DaveBlake! it would be great to move to official Kodi and to be able to keep audio outputs without the need of TV.
For those who need simultaneous audio outpu the great DA project will still be here, but those of us who would need just one audio output at once could keep up with master.

I suggest we should open a new thread for this, what do you think? This solution needs to be universal, if possible. Perhaps an addon would work, but then we again lose the possibility of switching audio quickly and easily from Android, WP, iOS clients that support Kodi. I use android and lately WindowsPhone much more frequently to control Kodi when listening to music. Any idea how could this be achieved?

EDIT: the only possible solution I see (atm, must think about it more) is to map the script to a remote function, as remote is the unit that most of us still tend to use. It is still a one more step compared to DA build, as we need to press a button on a remote, but that is a small price to pay, I believe. Do not base this on keyboard or mouse, as most of the people around don't use nothing except a remote and smart devices.


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - DaveBlake - 2015-08-10

@Memphiz thanks for that overview of audio processing, it does help and I appreciate the time that all contributers spend (even if they seem upset with me). Yeap, have done my share of code reading, but have also written many requirement specs, and high level design docs too. Sometimes a little bit of an overview upfront can save a great deal of trouble (and misunderstanding).

Just because I have found a hopefully more straightforward JSON based approach to serve my immediate needs, I may still have a look at multi zone audio design in due course. The info here may also temp some future reader into contributing too. Meanwhile we have a dirty fix to tide users over.

@gurabli a new thread does seem approriate, but where to start it? I am less keen on an addon for the reasons you give, so not there. This forum? Not exactly an application... But very much appreciate input from anyone.

Edit: Well, well it seems that some kind person has already created the addon. See Audio Profiles or this thread.

So rather than use dual audio to get non silmultanious audio output, change the settings to presets using an addon. Smile


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - JEDI JF - 2015-08-10

(2015-08-10, 13:16)gurabli Wrote: A little bit off topic here, but maybe some of you have already tried this (or perhaps would like to try).

HDMI audio extractor > HDMI, optical, 2ch analogue
Link

According to the description, it extracts audio stream from hdmi input, and it can do 3 things:

1) passtrough -- nothing is done, just hdmi in to hdmi out
2) 2ch -- audio is extracted from hdmi input to and sent in 2ch stereo (obviously) to hdmi out, optical, and 2xrca (wonder what DAC is used and the quality, nowadays there are very nice surprises with very high quality DACs used in cheep devices from China)
3) 5.1 -- audio is extracted from hdmi input, and send to optical and hdmi out, no analogue. The optical supports DD 5.1 and DTS.

I'm considering one of these, as it would solve my scenario, as the 5.1 mode would be perfect to have audio at the amp and tv too, while the 2xRCA for stereo amp

Of course, there are many questions:

-- is the audio extracted to optical if tv is turned off, will it work then?
-- what is the quality of the whole thing, what are the limitations, if any?

Has anyone tried this already? The price is really low, so might be worth a try.

At the company I work for we have a need to get an analog stereo signal as well as keeping the original audio signal the user needs (usually HDMI, bitstream, could be Dolby True HD or DTS-HD). We tried many of these extractors and most of them don't work as you might expect. We found 3 different behaviors:
1. Most very cheap ones will output an analog stereo signal ONLY if the source input is stereo (useless for us)
2. Some decent ones will output an analog stereo signal ONLY if the source input is basic Dolby/DTS/PCM but not DTS-HD or Dolby True HD (useless for blurays)
3. We only found one so far that worked as we needed: we could get an analog stereo signal from any sound format (including DTS-HD or Dolby True HD) and also output the original unaltered bitstream signal from the HDMI output to the AVR. It seemed to work with most equipment (you need to get their upgraded firmware to use multichannel instead of only stereo). http://atlona.com/product/at-hd-m2c. It is quite expensive but if you find another device that could do that, please let me know.

While we can't really ask customers to switch AVR, it seems to be the best solution. Some AVR (not many) can output analog sound (ie headphone jacks or analog RCA output) as well as to the speakers at the same time. That configuration is compatible with any source. I have to admit I was surprised that this feature is not available on most AVR seems it could be needed for families with hearing impaired members (you want the sounds to get to the speakers for everyone but you also need to have headphone sound for one member at the same time).

That is the main reason I visit this thread from time to time.


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - MrRimmer - 2015-08-20

(2015-08-10, 16:08)JEDI JF Wrote:
(2015-08-10, 13:16)gurabli Wrote: A little bit off topic here, but maybe some of you have already tried this (or perhaps would like to try).

HDMI audio extractor > HDMI, optical, 2ch analogue
Link

According to the description, it extracts audio stream from hdmi input, and it can do 3 things:

1) passtrough -- nothing is done, just hdmi in to hdmi out
2) 2ch -- audio is extracted from hdmi input to and sent in 2ch stereo (obviously) to hdmi out, optical, and 2xrca (wonder what DAC is used and the quality, nowadays there are very nice surprises with very high quality DACs used in cheep devices from China)
3) 5.1 -- audio is extracted from hdmi input, and send to optical and hdmi out, no analogue. The optical supports DD 5.1 and DTS.

I'm considering one of these, as it would solve my scenario, as the 5.1 mode would be perfect to have audio at the amp and tv too, while the 2xRCA for stereo amp

Of course, there are many questions:

-- is the audio extracted to optical if tv is turned off, will it work then?
-- what is the quality of the whole thing, what are the limitations, if any?

Has anyone tried this already? The price is really low, so might be worth a try.

At the company I work for we have a need to get an analog stereo signal as well as keeping the original audio signal the user needs (usually HDMI, bitstream, could be Dolby True HD or DTS-HD). We tried many of these extractors and most of them don't work as you might expect. We found 3 different behaviors:
1. Most very cheap ones will output an analog stereo signal ONLY if the source input is stereo (useless for us)
2. Some decent ones will output an analog stereo signal ONLY if the source input is basic Dolby/DTS/PCM but not DTS-HD or Dolby True HD (useless for blurays)
3. We only found one so far that worked as we needed: we could get an analog stereo signal from any sound format (including DTS-HD or Dolby True HD) and also output the original unaltered bitstream signal from the HDMI output to the AVR. It seemed to work with most equipment (you need to get their upgraded firmware to use multichannel instead of only stereo). http://atlona.com/product/at-hd-m2c. It is quite expensive but if you find another device that could do that, please let me know.

While we can't really ask customers to switch AVR, it seems to be the best solution. Some AVR (not many) can output analog sound (ie headphone jacks or analog RCA output) as well as to the speakers at the same time. That configuration is compatible with any source. I have to admit I was surprised that this feature is not available on most AVR seems it could be needed for families with hearing impaired members (you want the sounds to get to the speakers for everyone but you also need to have headphone sound for one member at the same time).

That is the main reason I visit this thread from time to time.

I too did similar research and came to the same conclusion, hence the need for dual audio - SPDIF output in 5.1 to my (legacy) AMP, and HDMI 2.0 to the TV & projector (via HDMI splitter). As of yet, nothing seems to be able to take HDMI inc. DTS-MA (or equivalent) and do this in hardware.


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - t4mm - 2015-08-21

Edit: Please ignore, I was able to get it working by putting realtek s/pdif on the first audio and hdmi to tv on 2nd output. Thanks. this is working great.

Hi,

this is exactly what I am looking for. Thanks. I, however, tried this and I am getting stuttering playback and no/noise in audio. I may be doing something wrong here. Here is my setup

- HDMI out going to LG tv that cannot decode ac3 audio
- Realtek ACL892 S/PDIF going to AVR through coax cable which supports ac3 and DTS.

In my settings for first audio pane I have tried both directsound and wasapi going to LG tv through HDMI. There I don't have passthrough enabled. Should I have?
In the 2nd audio settings panel, enabled dual audio and changed the Audio output to directsound or wasapi realtek. I also tried setting this to HDMI as well adn enable passthrough to realtek s/pdif but still same problem.

Can you please let me know how do I configure this.

Thanks.


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - curtis-r - 2015-08-23

I had posted a thread many years ago about possible simultaneous audio output, but just discovered this thread. Is there any support for Isengard?


RE: [Project] Return of the Dual Audio Output support (Helix/Gotham/Frodo) - getafix - 2015-08-23

Is there anything on the PC side that needs to be configured for dual output. Have an Asrock B85M-ITX mobo.


This forum uses Lukasz Tkacz MyBB addons.