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)



- sebak - 2011-02-22

gnif Wrote:Semi-Unrelated to AE

* I have started implementing TagLib into XBMC, it is a little delayed currently though because TagLib does not have any way to do IO abstraction so our VFS cant be implemented. I am working with the TagLib devs to add this support.

Is there any progress/news on this?


- gnif - 2011-02-24

@sebak - Its partially implemented but I have stopped as it could not solve the problem I had encountered. Once AE is done I will move back onto this as we should really be using it.

Another update...

* PAPlayer now behaves properly with xfade, no more segfaults
* Normalization of mixing multiple sounds/streams has been disabled as it caused xfade volume issues, will look for an alternative solution.

* There is a complete wrapper set of classes that should, once I add the GUI settings allow us to switch between playback engines without having to stop/restart playback! Cool huh Cool.

These changes are pretty extensive and may have caused other breakages, so be weary if you are using it.

And one final fix that is critical to those streaming via HTSP, etc... GetCacheTime and GetCacheTotal were not implemented in AE, they are now, and the audio jutter issue caused when a stream contains the odd corruption has been corrected. This one has plagued me for months and I am very excited to have finally figured it out. Laugh


- Fneufneu - 2011-02-28

some issues faced:
- does not compile without pulseaudio:
missing some #ifdef HAS_PULSEAUDIO
idealy, would compile without alsa too
- does not compile with external python:
missing lot's of #include "config.h" where #if (defined USE_EXTERNAL_FFMPEG) is used
- you can use @abs_top_srcdir@ macro in Makefile for INCLUDES and Makefile.include
- AE_FMT_FLOAT, AE_FMT_S24NE, AE_FMT_S24BE, AE_FMT_S24LE not defined here

final linkage failed with error:
Code:
xbmc/cores/AudioEngine/audioengine.a(AEEncoderFFmpeg.o): In function `DllAvCodec::avcodec_encode_audio(AVCodecContext*, unsigned char*, int, short const*)':
/fneufneu/xbmc/lib/DllAvCodec.h:188: undefined reference to `avcodec_encode_audio(AVCodecContext*, unsigned char*, int, short const*)'
xbmc/cores/AudioEngine/audioengine.a(AEEncoderFFmpeg.o): In function `DllAvUtilBase::av_log_set_callback(void (*)(void*, int, char const*, __va_list_tag*))':
/fneufneu/xbmc/lib/DllAvUtil.h:85: undefined reference to `av_log_set_callback(void (*)(void*, int, char const*, __va_list_tag*))'
xbmc/cores/AudioEngine/audioengine.a(AEEncoderFFmpeg.o): In function `DllAvCodec::avcodec_register_all()':
/fneufneu/xbmc/lib/DllAvCodec.h:159: undefined reference to `avcodec_register_all()'
xbmc/cores/AudioEngine/audioengine.a(AEEncoderFFmpeg.o): In function `DllAvCodec::avcodec_find_encoder(CodecID)':
/fneufneu/xbmc/lib/DllAvCodec.h:170: undefined reference to `avcodec_find_encoder(CodecID)'
xbmc/cores/AudioEngine/audioengine.a(AEEncoderFFmpeg.o): In function `DllAvCodec::avcodec_alloc_context()':
/fneufneu/xbmc/lib/DllAvCodec.h:190: undefined reference to `avcodec_alloc_context()'
xbmc/cores/AudioEngine/audioengine.a(AEEncoderFFmpeg.o): In function `DllAvCodec::avcodec_open(AVCodecContext*, AVCodec*)':
/fneufneu/xbmc/lib/DllAvCodec.h:165: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
xbmc/cores/AudioEngine/audioengine.a(AEEncoderFFmpeg.o): In function `DllAvUtilBase::av_freep(void*)':
/fneufneu/xbmc/lib/DllAvUtil.h:90: undefined reference to `av_freep(void*)'
/fneufneu/xbmc/lib/DllAvUtil.h:90: undefined reference to `av_freep(void*)'
/fneufneu/xbmc/lib/DllAvUtil.h:90: undefined reference to `av_freep(void*)'
/fneufneu/xbmc/lib/DllAvUtil.h:90: undefined reference to `av_freep(void*)'

hope that help Smile


- gnif - 2011-02-28

@Fneufneu - Thanks for the info, can you please provide patches though? my workload is quite high at the moment and I do not have time to hunt these issues down.


multiple audio outputs - s7mx1 - 2011-03-02

For anyone interested in multiple audio outputs you should be really looking into pulseaudio. I would rather see a lean, robust AE. Besides no need to invent the wheel again if you can do things with pulseaudio already.

Currently I have pulseaudio with a dummy device setup as a default output, I then have gstreamer streaming audio from the device and multicast/unicast to the whole local lan. I then set up gstreamer receiver on every device I want to receive, be it laptop, desktop and even my android phone which can play the same audio simultaneously albeit with slightly different latency. Gstreamer also works on any router support openwrt.

For devices on the same machine you can just try "parec | pacat", which should just do the job for you.

If AE can configure to use different pulseaduio output devices easily then it will be really great as currently I have to maintain 2 profile to switch between HDMI and streaming.



Loto_Bak Wrote: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!



- Fneufneu - 2011-03-11

here is the patch:
http://fneu.fr/freebsd/xbmc/patch.xbmc.freebsd.AE.patch.txt

i didn't resolv my final linkage error Sad


- s3verian - 2011-03-17

This thread is my homepage - any love?

Specifically, looking to bitstream HD audio codecs from windows without resorting to an external player.

Can't wait for the alpha/beta/omega build for testing Smile


- cbxbiker61 - 2011-03-23

Patches to fix linkage errors. Always have to use extern "C" on ffmeg headers, otherwise links will fail.

http://silka.with-linux.com/xbmc/audioengine/


- Anssi - 2011-03-23

cbxbiker61 Wrote:Patches to fix linkage errors. Always have to use extern "C" on ffmeg headers, otherwise links will fail.[/url]
Why are ffmpeg files included directly, shouldn't AE use #include "DllAvCodec.h" etc. instead so that the #ifdef trickery etc. doesn't need to be duplicated everywhere?


- davilla - 2011-03-23

yes, AE better be using the "DllAvCodec.h" and friends via an m_dll not calling ffmpeg routines directly.


- s3verian - 2011-03-29

Is there a tentative ETA for AE inclusion in the nightlies?


- topfs2 - 2011-03-29

Most likeley as soon it supports core audio the merging will start.


- liquidskin76 - 2011-03-29

Hi Guys,

Was wondering if there was one of gnif's cool progress reports on the horizon? Really curious how hd audio bitstreaming is coming along?

Thanks... and keep up the great work!


- Fneufneu - 2011-03-30

i made a fork to work on OSS support on FreeBSD, it builds and works fine now.
i'll let my wife test it more Big Grin
https://github.com/Fneufneu/xbmc/commits/freebsdAE

some questions:
- why default AE_FMT_FLOAT ?
- in xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp
AE_FMT_S24{LE,NE,BE} are not declared in enum AEDataFormat (AEAudioFormat.h)
you declare AE_FMT_S24{LE,NE,BE}4 and AE_FMT_S24{LE,NE,BE}3
- i comment SNDCTL_DSP_BIND_CHANNEL on FreeBSD
it breaks the sound and it's declared as: "Few ioctl calls that are not official parts of OSS." on headers.


- jd2157 - 2011-04-05

topfs2 Wrote:Most likeley as soon it supports core audio the merging will start.

Anyone know if there's anything else left on the todo list (other than core audio) before the merging will start? Just trying to (politely Smile ) get an idea if we're looking at weeks or months in terms of ETA.