Kodi Community Forum
AudioEngine branch - DO NOT REQUEST BINARY BUILDS - 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: AudioEngine branch - DO NOT REQUEST BINARY BUILDS (/showthread.php?tid=78289)



- liquidskin76 - 2011-02-06

Cheers for the update gnif, really looking forward to hd audio bitstreaming.


- kulprit - 2011-02-06

I always thought what made the most sense for dual audio output was 2 different streams. ie, hdmi to receiver and through to zone 1 (watch movie in living room), optical from htpc to receiver to zone 2 (outdoor speakers playing music). Not sure if this is possible either.

All sounding great gnif, thanks for keeping us updated.


- lloydsmart - 2011-02-06

Sounds fantastic gnif, keep up the good work. Really looking forward to the day this merges into trunk!


- einhänder - 2011-02-06

kulprit Wrote:I always thought what made the most sense for dual audio output was 2 different streams. ie, hdmi to receiver and through to zone 1 (watch movie in living room), optical from htpc to receiver to zone 2 (outdoor speakers playing music). Not sure if this is possible either.

This would be one scenario. There are more that come into my mind.

1. What you mentioned
2. Similar to (1.). Personally I often have some video running, e.g. a documentation. In such situations it would be nice to play music instead of the audio track of the video. Not really a kind of dual output but somehow related. (e.g. play video -> move to music -> play track -> dialog pops up asking one to play the music stream instead of the video audio track -> enjoy video plus individual audio playback)
3. Some people hook up different outputs to different devices for different purposes.
This could be:
- HDMI to AVR for passing through AC3/DTS (Homecinema)
+
- Toslink or Cinch to Stereo Amp (Music)
-> No Problem so far. But for flexibility it would be nice to have the stereo stream on the two selected outputs at the same time. Nobody needs passthrough on a device that isn't capable of decoding it (Stereo Amp, TV, etc.)

As I read on previous posts this seems to be a developer's nightmare. But would it be possible for (3.) to take another way. What comes into my mind is to change the output device on the fly. E.g. by right clicking a music track one could select "play over hdmi" or "play over toslink", etc. In a situation where playback has already been started one could select another device via osd. (playback already running -> select new output device -> xbmc remembers current position of track -> xbmc stops track -> xbmc switches to new device -> xbmc continues playback at stored position -> playback over new device starts).


- htpc guy - 2011-02-06

Dual audio output or simultaneous output through 2 different ports (HDMI and Optical). This is currently what I have my setup doing.

Uses:

My daughter wants to watch a cartoon. We leave the receiver off and the sound comes out of the television.

I want to watch a movie. I turn the volume on the tv off and turn the receiver on for 5.1 surround.


- Clumsy - 2011-02-06

Please keep your dual audio output talk in a dedicated thread. It clobbers up the thread here for people who are looking for updates on the AE branch with mostly unrelated discussions.

edit: and with unrelated I mean pages of people giving scenarious why such a feature would be worthwhile. The request has been noted and might or might not be considered. Please organize such a discussion elsewhere though.


- gnif - 2011-02-07

Another update...

* PAPlayer no longer has any hang issues on advancing through the queue

The choppy audio issue has reared its head again, so I will be looking into it some more.

Regarding Dual Output, think of this scenario,

If you want both SPDIF out & HDMI out to work at the same time and you have a 7.1 video source, for SPDIF:

Decode to LPCM, downmix to 5.1, encode to AC3 -> Output

For HDMI:

Decode to LPCM -> Output (at-least until TrueHD & DTS-MA)

Decoding takes time and introduces a lag due to buffers
Downmixing introduces a lag due to buffers
encoding introduces a lag due to buffers
padding for IEC958 introduces a lag due to buffers

HDMI & SPDIF have different buffer sizes in hardware.

The amount of overhead to implement this feature for the odd person that wants it, the extra complexity of code, and the latency issues with syncing the audio & video when there are two audio clocks that are not in sync, and have very different output chains makes this a technical nightmare and mess.

I will NEVER, and I cant stress that enough, promote or agree with dual audio output in XBMC, if you want that, seek another solution, xbmc is NOT a mixing platform, OR a media extender, other devices that can do this have this implemented in HARDWARE on dedicated chips designed specifically to do this.

Please stop asking for it, and discussing it here, AE is aimed at audio purity and code cleanliness, NOT new features beyond new audio formats and some basic DSP.

There has been discussions of writing a plugin system for AE in the future, if/when this occurs then someone can write a dual audio output plugin, but it will NEVER be a native part of AE.


- myrison - 2011-02-07

Gnif, consider me totally convinced dual output is a very bad idea technically. Smile (and thank you for the update)


- gnif - 2011-02-08

Another update.

* Crash with 14Bit DTS stream parsing and output has been corrected
* Crash when output sink fails to open in RAW mode corrected
* Initial implementation of AE Wrapper classes so that we can switch between CSoftAE and CPulseAE on the fly.\
* GUISound lag when speaker layout is greater then 2.0 is now fixed


- Goga777 - 2011-02-11

I couldn't compile today AE git version

Quote:make -C xbmc/cores/AudioEngine
make[1]: Entering directory `/usr/src/xbmc/AE/xbmc/xbmc/cores/AudioEngine'
/usr/bin/ccache g++ -MD -c -fPIC -DPIC -D_REENTRANT -D__STDC_LIMIT_MACROS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -D_DEBUG -Wall -O2 -D_LINUX -D_FILE_DEFINED -D__STDC_CONSTANT_MACROS -DBIN_INSTALL_PATH="\"/usr/local/lib/xbmc\"" -DINSTALL_PATH="\"/usr/local/share/xbmc\"" -DHAS_SDL_JOYSTICK -D'GIT_REV="583e1b5"' -DHAVE_CONFIG_H -I. -I../../ -I../../linux -I../../../guilib -I../../utils -I../dvdplayer -I../dvdplayer/Codecs/ffmpeg -I.. -DDBUS_API_SUBJECT_TO_CHANGE -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -I/usr/include/alsa -I/usr/include/dbus-1.0 -I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/hal -I/usr/include/libpng12 -I/usr/include/mysql -I/usr/lib/dbus-1.0/include -I/usr/src/xbmc/AE/xbmc -I/usr/src/xbmc/AE/xbmc/lib -I/usr/src/xbmc/AE/xbmc/xbmc -I/usr/src/xbmc/AE/xbmc/lib/ffmpeg -I/usr/src/xbmc/AE/xbmc/xbmc/linux AEFactory.cpp -o AEFactory.o
AEFactory.cpp: In static member function ‘static bool CAEFactory::LoadEngine(AEEngine)’:
AEFactory.cpp:31: error: expected type-specifier before ‘CPulseAE’
AEFactory.cpp:31: error: expected ‘)’ before ‘CPulseAE’
AEFactory.cpp:31: error: no matching function for call to ‘CAEWrapper::SetEngine(int*)’
AEWrapper.h:41: note: candidates are: bool CAEWrapper::SetEngine(IAE*)
make[1]: *** [AEFactory.o] Ошибка 1
make[1]: Leaving directory `/usr/src/xbmc/AE/xbmc/xbmc/cores/AudioEngine'
make: *** [xbmc/cores/AudioEngine/audioengine.a] Ошибка 2



- martdj - 2011-02-15

Edit: Never mind the below. I should read the whole thread, before starting to comment.

I think most people don't actually want simultaneous dual output, but they want an easy (one-button) way to switch from one to the other. Not sure if that has at all to do with the audioengine, but an easy way to switch outputs would be appreciated.


- erhnam - 2011-02-15

martdj Wrote:Edit: Never mind the below. I should read the whole thread, before starting to comment.

I think most people don't actually want simultaneous dual output, but they want an easy (one-button) way to switch from one to the other. Not sure if that has at all to do with the audioengine, but an easy way to switch outputs would be appreciated.

Yeah, like the Apple Remote app on the iPhone. Maybe a RPC call to get all the devices and switch will help!


- Roelio - 2011-02-18

Nice work gnif I hope you have some good information for us soon Big Grin


- Loto_Bak - 2011-02-20

Re Using multiple audio outputs possible solution

With AE doing all our mixing now it should be possible to use alsa to copy frontL and frontR channels to a 2nd or 3rd output.

This solves all 2ch situations... it does not address multichannel.
Needing multiple, multichannel outputs is very rare. Every request I see is for a 2nd 2ch output, usually analog.
Perhaps to simplify things providing a 2ch downmix full time would be a solution?

I don't think anyone is literally trying to 'monitor' multiple outputs simultaneously, but having to change technical settings on the fly is very user UNFRIENDLY.
Look at every set-top box out there, generally they drive all outputs simultaneously not because its the highest quality solution, but because its user friendly.

Summary- Provide 1 multichannel output, provide 1 2ch downmix. Users can use alsa to copy 2ch to all other outputs.

Not trying to drag this up over and over, just trying to provide a useful solution. I apprecate all the work on AE, its a fantastic feature upgrade XBMC could really use!


- topfs2 - 2011-02-21

Ok please, it has been said before. NO reason to post dual audio stuff now, it is outside the scope of this thread so please don't post anything regarding this.