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)



- DDDamian - 2012-01-27

Padding with null is bad if there actually are more channels available than the source provides e.g. two-channel should be sent as such regardless of speakers available without padding so receivers can do Dolby ProLogic etc.

Is it just limited to the downmixing code?


- gnif - 2012-01-27

@DDDamian - Ill explain a little better,

Alsa has a standard channel order map:

FL, FR, BL, BR, FC, LFE, SL, SR

So, if you want to output FL, FR and FC, you need to open 5 channels, even though your only using 3, the problem here is that the remap code will still output audio to those extra unused channels (BL, BR) if it is in the source stream instead of down-mixing and nulling those channels out. If the user has selected that they have a 3.0 setup, then that's what we have to present otherwise BL and BR are being sent nowhere and the sound is lost.


- DDDamian - 2012-01-27

So you need to mix BL at say 20% volume to FL, BR at 20% to FR. I've seen other code that does that, though for the life of me can't remember where.

Adds some complexity. The alternative is to lose the info.


- gnif - 2012-01-27

DDDamian Wrote:So you need to mix BL at say 20% volume to FL, BR at 20% to FR. I've seen other code that does that, though for the life of me can't remember where.

Adds some complexity. The alternative is to lose the info.

It is already all written and handled in CAERemap, but there is a bug that if the output has these extra BR and BL channels in it, even if the user doesn't have them, it will still output to them instead of sending null data to them.

Here is an example of the invalid downmix, my output is set to 3.0, and this is what is being sent to the sink:

Code:
16:57:56 T:140076678125312    INFO: ==[Downmix Matrix]==
16:57:56 T:140076678125312    INFO: FL = FL(1.0000) SL(0.7071) LFE(0.7071)
16:57:56 T:140076678125312    INFO: FR = FR(1.0000) SR(0.7071) LFE(0.7071)
16:57:56 T:140076678125312    INFO: BL = SL(0.7071)
16:57:56 T:140076678125312    INFO: BR = SR(0.7071)
16:57:56 T:140076678125312    INFO: FC = FC(1.0000)
16:57:56 T:140076678125312    INFO: ====================

It should be something like this
Code:
17:15:38 T:139927887017728    INFO: ==[Downmix Matrix]==
17:15:38 T:139927887017728    INFO: FL = FL(1.0000) SL(1.0000) LFE(0.7071)
17:15:38 T:139927887017728    INFO: FR = FR(1.0000) SR(1.0000) LFE(0.7071)
17:15:38 T:139927887017728    INFO: FC = FC(1.0000)
17:15:38 T:139927887017728    INFO: ====================



- DDDamian - 2012-01-27

Make another loop to parse it once all the mixing's done? Brute-force, but not real-time, so it's not adding much overhead. You've got your desired levels of mixing already.


- gnif - 2012-01-27

For the sake of completeness, the below issue has been fixed in this commit: https://github.com/gnif/xbmc/commit/f6693dca52d51bf4d7054437c6acb8074ffe77ff


- Hack_kid - 2012-01-27

Hey gnif is it by design or a bug that on first install of xbmc with AE the first time you run xbmc the volume is all the way down. It happens with a clean install on both Linux and windows


- gnif - 2012-01-27

@Hack_kid - this only occurs if you have run the original xbmc before AE, the setting in AE is not stored as an integer any more but a float, this is why it is turned down after you launch AE as the value would have been 0, meaning 0 de-amplification, where in AE 1.0 is 100% volume.


- sjongele - 2012-01-27

gnif, TrueHD and DTS-HD MA work well, as well as DTS with HD content. Something goes wrong though with 50/60Hz interlaced content as found on DVDs (both DD and DTS) and via Mythbox (DD, interlaced HD and SD content): the framerate gets reduced to 4-7 fps and there is no sound.


- rodercot - 2012-01-27

fresh pull and build debug is on. resume from suspend

CPU usage on an atom/ion with a gt 430 is 125%
no audio and tailing the log it still is producing

Code:
16:37:51 T:3077569392   ERROR: CAESinkALSA::AddPackets - snd_pcm_writei returned -86
16:37:51 T:5361776   ERROR: Previous line repeats 404 times.
16:37:51 T:5361776   DEBUG: UnloadExtensionLibs, clearing python extension libraries
16:37:51 T:3077569392   ERROR: CAESinkALSA::AddPackets - snd_pcm_writei returned -86
16:38:11 T:2987391856   ERROR: Previous line repeats 621934 times.
16:38:11 T:2987391856   DEBUG: Thread Jobworker 2987391856 terminating (autodelete)
16:38:11 T:3077569392   ERROR: CAESinkALSA::AddPackets - snd_pcm_writei returned -86
16:40:40 T:5361776   ERROR: Previous line repeats 4956846 times.

and it just keeps repeating throughout I figured since it does not do this in EDEN b1 or 2 it must be ON TOPIC.

Dave


- grote002 - 2012-01-28

sjongele Wrote:gnif, TrueHD and DTS-HD MA work well, as well as DTS with HD content. Something goes wrong though with 50/60Hz interlaced content as found on DVDs (both DD and DTS) and via Mythbox (DD, interlaced HD and SD content): the framerate gets reduced to 4-7 fps and there is no sound.

Hi sjongele, try switching the 'deinterlace method' from 'Auto Select' to something like 'blend', that fixed it for me.


- gnif - 2012-01-28

@rodercot - Please provide a complete log via pastebin, it the information you gave is not enough for me to replicate the problem, if I cant replicate it, I cant fix it. Might be a suspend/resume issue with ALSA from what I understand, I assume it works fine before suspend/resume?


- CrystalP - 2012-01-28

IIRC driver support for WASAPI event mode is not mandatory. As long as there's a fallback on Direct Sound when support is missing, we should be fine.

The inaudible volume for Dharma/Eden upgraders is likely going to be a strong bug-report generator Smile


- DDDamian - 2012-01-28

It trys Wasapi first, DS if Wasapi fails to intialize.

Hey gnif - two versions, one float, one integer for those who can't turn it up Laugh


- gnif - 2012-01-28

@CrystalP - Been planning to put a check in there for it, but DDDamian might be onto a better idea, create a new setting name and deprecate the int value, this will allow both versions to work without messing around.