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)



Gnif, you are genius for working this out... - AGunzXBMC - 2011-08-12

I'm new to git so I haven't been able to compile my own yet. I'm using Waniltons from 7/15 and it runs like a dream. Bugs here and there but I'll deal with it for the hd audio. Just wanted to say thanks to you and Wanilton and whoever else is working on this project Big Grin.


- gnif - 2011-08-13

@X3lectric - It is on the list of things to investigate, but it will almost certainly not be in the initial version of AE.

AE does not change how input was previously handled at all, and I have not even looked at that code, so it should work as it previously did.


- X3lectric - 2011-08-13

gnif Wrote:@X3lectric - It is on the list of things to investigate, but it will almost certainly not be in the initial version of AE.

AE does not change how input was previously handled at all, and I have not even looked at that code, so it should work as it previously did.

It doesnt work thers no code thers no input...

not since XBOX days. Then eveything input worked 100%

so karaoke today it plays ok but thers no way to input a microphone into the HTPC and ear your self sing or the neighbour or your grandmother etc.

So be safe i knowing while linux handles input quite well xbmc doesnt in any manner speak to that input nor by alsa nor by pulse nor by magic.

cheers.


- mdvries - 2011-08-13

@gnif
Strange, I switched the GT220 card with the GT520 and now it works (though after a while the movie freezes) and the GT220 did work with other audio. Well wanted to have a HDMI 1.4 interface in my HTPC anyway Smile. Thanks for your great work.


- ix400 - 2011-08-14

Hi,

will the audio engine branch be merged with the main branch soon?

In other words, can we hope for an Eden Beta1 that includes TrueHD support this autumn?

Chris


- gnif - 2011-08-15

@X3lectric - As I said, if XBMC has it now, it will have it in AE... since it doesnt, AE doesnt. karaoke is not a priority and wont be for quite some time, (ie, AE merged into master)

@ix400 - It will be ready when its ready.

@mdvries - Can I please have a log of when the movie freezes? Or even better, can you please run it under a debugger and produce a backtrace?

To do so, run: gdb /path/to/xbmc/xbmc.bin

then type "r" to start the program. When it freezes, switch back to the terminal and hit CTL+C, then type "thread apply all bt" and pastebin the results and the log.


Downmixing gain/drc/normalization - DeViLRuNNeR - 2011-08-15

Dear users,

First off congrats on the excellent XBMC.
I have been using it for years now and it's nice to see further improvements keep on coming.

I would like to inquire if the new audio engine is going to fix/support any downmixing issues.

Let me explain;
Like so many XBMC/BOXEE users I have a pretty simple setup.
I have a HTPC(asrock ion330) running XBMCLive 10.1 Dharma.
This Device is connected with HDMI to my HDTV.
Like most HDTV screens it doesn't support any form of surround audio input like DD or DTS. Only 2.0 PCM sound is accepted.

XBMC -(HDMI)-> HDTV

No problem XBMC provides nice options in the audio setup to put it in 2.0 downmixed boosted output...and everything seems to work fine.
However, and I am surely not the only one having this, when you play anything with surround sound DD(AC3) or DTS the voice dialog seems very silent and the effects blast you away.
Resulting in anticipating loud scenes and constantly controlling the volume accordingly. Not a nice thing todo.

I have been reading allot on the subject and this seems a source of frustration to many users...even boxee is affected by it.
I have tried writing ALSA configs using vdownmix, ldaspa etc... nothing seems to fix the problem.
I remember in the olden days there was a AC3 fix for this on windows and FFDShow and vlc all seem to do fine.

Is there any news as to when or if this is going to be fixed in the new audioengine?
Is it going to be something like a alsa plugin?
Some software embedded like (DTS Neural Surroundâ„¢ DownMix).
Maybe some options like the olden days with DRC?

Hope to hear from you guys.


- mdvries - 2011-08-15

@gnif
I tried to do what you asked but didn't succeed completely (see below).

More details about "hanging":
- Movie runs for lets say 5-10 mins
- Movie then freezes
- After a few seconds you hear the audio stuttering and video remains freezed
- Few more seconds and the audio seems to play fine: video remains freezed
- More importantly: The whole X display of ubuntu freezes which makes it impossible to do the CTRL-C on gdb as I can't operate the terminal window where it is running in. What I do then is walk to my Macbook and do a kill -9 on the xbmc session. Then I go back to my media PC again and the X session is available again. When I type "thread apply all bt" after this on gdb nothing happens (just a new line).

What I could do on logging for you is do a copy paste on the "thread" messages of gdb. See first pastebin. I also made a xbmc.log. See second pastebin. For privacy reasons I removed the part that is not about running the movie. If you have questions about what config I have please let me know. What might be important information is that I use Video clock resampling. Here the pastebins:

1. http://pastebin.com/awmC1fGw
2. http://pastebin.com/NMDGMGAU

Please feel free to ask if you need info.

Btw, maybe not impotant but I have to run with AE_ENGINE=SOFT to get it to work cause with pulseaudio activated I can't get bit-streaming to my receiver. Will that become an option in XBMC eventually? So a switch in audio settings like "PulseAudio on" and then a bullet?


Thx.


- gnif - 2011-08-17

@mdvries
Thanks for the attempt Smile. What you need to do is connect to the machine from another PC via SSH and run xbmc from there so you can issue commands to the debugger, like so

Code:
ssh [email protected]
startx &
export DISPLAY=:0
export AE_ENGINE=SOFT
gdb /path/to/xbmc.bin

As for the AE_ENGINE question, no, there will not be for quite some time due to the nature of how the audio code works, it needs to be selected during start-up. You can however uninstall pulse, or add "export AE_ENGINE=SOFT" to /home/user/.profile so it is always set.

@DeViLRuNNeR
Down-mixing reduces volume, this is why...
Say we have two channels we wish to mix into one... that means, two audio samples. All audio resolutions have a minimum and maximum range, for example, float's range is -1.0 to 1.0, where 0.0 is silent, anything beyond this range is distortion, the audio card cant render it without possibly damaging your speakers by clipping the audio at its peaks.

When we mix two samples together the math is very simple, it does include RMS power calculations, but for this example we will keep it simple.

output = (sample1 + sample2) / 2

So lets say sample1 = 1.0, and sample2 = 1.0, this will give us a final result of 1.0. The division by 2 is required to keep the result inside the range of the data format, but it also has the effect of attenuating the output. There is no way to overcome this, it is a hardware limitation. The boost option in XBMC is a hack, it just removes the divisor, so the final result in this example will be 2.0, which depending on your sound card, may be clipped, cause distortion, etc.

The only safe way to increase the volume is to perform DRC (Dynamic Range Compression) which muddies the quality of the signal and many people don't like it. But even so, it is a planned feature for later.


- mdvries - 2011-08-17

@gnif
Should have thought about that measure myself. Anyhow, I made the stack trace which can be found here:

http://pastebin.com/0yAq5YUJ

Same thing happened as described in my previous message although it seemed to happen a bit quicker this time (within a few mins). So: Video freezes and stays frozen, audio silent for a while and then starts stuttering and after a few seconds just clear audio but video stays frozen.

Have your latest on git compiled (10th of august).


- X3lectric - 2011-08-17

gnif Wrote:@X3lectric - As I said, if XBMC has it now, it will have it in AE... since it doesnt, AE doesnt. karaoke is not a priority and wont be for quite some time, (ie, AE merged into master)

yea I get its not a max priority certainly within your plan to include into master, Im sure you will have it somewhere down there in the todo list, and thats fine by me...

you know I appreciate good work,

I cant wait until its in a ubuntu version that has matured enough and can last all I know is lucid is pretty sweet-spot.


Bit-Perfect audio - bergstr - 2011-08-18

Hello there,

I am fairly new to the subject of audio in general, computer audio in particular and XBMC as well, and hope I dont get thrown out of this thread before I get my answers. What I do have is a software engineering background, and a bunch of FLAC files (w/ CUE sheets) that I want to output through XBMC to my analog stereo HIFI Amp, achieving the same audio quality as I have when I play the original CD from an attached CD player.

I am running (stock 10.1 Dharma) XBMC on a ATOM/ION box with Windows 7 (64 bist), and have a USB sound card attached that claims to be audiophile, provided it is used through the ASIO driver that comes with it. Currently, without the driver, my results are noticeably worse than the CD/Amp combination. I tried switching to the WASAPI option, but that resulted in partially distorted output (only during high frequency passages).

Can anybody tell me what my options are for achieving my goal? Will the new AE build get me further? What about an operating system switch?

thanks in advance


- GreenEyez - 2011-08-18

What USB soundcard (model/manufacturer)? Because most cards, like the Asus Xonar U3 are very weak compared to their internal/PCI brothers, mostly limited to 16bit/48Hz, unlike an entry level Xonar DS that does 24bit/196Hz, and has better DACs. Only a handful of external USB DACs can be considered "audiophile" grade, and internal soundcards like the mid to high end range of the Asus Xonar line.


- bergstr - 2011-08-18

GreenEyez Wrote:What USB soundcard (model/manufacturer)? Because most cards, like the Asus Xonar U3 are very weak compared to their internal/PCI brothers, mostly limited to 16bit/48Hz, unlike an entry level Xonar DS that does 24bit/196Hz, and has better DACs. Only a handful of external USB DACs can be considered "audiophile" grade, and internal soundcards like the mid to high end range of the Asus Xonar line.

Its a Pro-ject audio Usb Box, and it is indeed limited to 16bit/44,1kHz. But isn't that the sampling rate of the CD material anyway? In any case, the box comes in an impressive little housing, and is marketed and applauded elsewhere as audiophile.. I was also considering an ESI Gigaport HD, which can do 24/196 and comes with ASIO drivers - but what would that do in combo with XBMC?


- giantpopples - 2011-08-18

If you want to have really audiophile output, i suggest you go with an external DAC from Audiophile Brand, and connect it to the spdif or optical output of your current soundcard. Wink

You'll be limited to stereo sound, but as i understand this is what you want.

AE may provide audio enhancement either way, since it optimize the audio output (depth, frequency..).