Kodi Community Forum
Testing audio engine ActiveAE - 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: Testing audio engine ActiveAE (/showthread.php?tid=170338)



RE: Testing audio engine ActiveAE - cg110 - 2014-03-22

Hi,

just looking over static analysis results for audioEngine and a couple of items stand out:
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/AESinkFactory.cpp#L251
The indentation doesn't match the actual code. IE is it meant to have { } around it as the indentation implies?

And
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/Utils/AEStreamInfo.cpp#L492
Coverity says:
CID 718837 (#1 of 2): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: data[7] & (768 /* 3 << 8 */) is always 0 regardless of the values of its operands. This occurs as the bitwise first operand of '|'.

I suspect that the bracing is wrong.

Thanks,
Chris


RE: Testing audio engine ActiveAE - fritsch - 2014-03-22

Thanks,

first one is clear, yes - return is wrongly indended

Second one:

Code:
m_fsize     = ((((data[7] & 0x3 << 8) | data[6]) << 4) | ((data[9] & 0x3C) >> 2)) + 1;

Should "perhaps" be:
Code:
m_fsize     = (((((data[7] & 0x3) << 8) | data[6]) << 4) | ((data[9] & 0x3C) >> 2)) + 1;

Edit: Should fix it: https://github.com/fritsch/xbmc/commits/activeae-coverity


RE: Testing audio engine ActiveAE - popcornmix - 2014-03-22

(2014-03-22, 20:55)fritsch Wrote: Should "perhaps" be:

Should *definitely* be.

The first does "data[7] & 0x300" which is always zero.
The second does (data[7] & 0x3) << 8 which will be quite different.


RE: Testing audio engine ActiveAE - fritsch - 2014-03-22

@popcornmix: https://github.com/xbmc/xbmc/pull/4461

Sometimes one does not know what the preamble expects :-) There was a time when even "nops" were meant to optimize something. But yes you are right.


RE: Testing audio engine ActiveAE - jjd-uk - 2014-03-31

FernetMenta/fritsch,

There's a user issue I forgot about, if either of you have a moment could you look at http://xbmclogs.com/show.php?id=155892

User thread http://forum.xbmc.org/showthread.php?tid=187858&page=2

Problem: MP3's with 44.1khz sample rate have no sound when using WASAPI on Windows

Actions carried out:

User was on Frodo when 1st having this problem, using the advanced settings to resampling audio to 48 khz fixed the problem on Frodo.

I asked user to try Gotham using the Best Match settings to see if they still get the same problem with ActiveAE.

They have now tested and still get the same problem as with Frodo, the above debug log should show 2 songs being played, the 1st song "Changed The Way You Kiss Me" with a 44.1khz sample rate with no sound and the 2nd song "01 Gonorrhea (Prod. by Kane Beatz)" with a 48khz sample rate where they do get sound.

In Gotham using Fixed and setting 48khz as sample rate fixes problem, however this then causes a problem with DTS passthrough for the user.


RE: Testing audio engine ActiveAE - fritsch - 2014-03-31

Yeah most likely a pioneer or a denon AVR - those have a big issue with 1080p and refreshrate > 24 hz. Cause the AVRs just don't play sound with 44.1 khz.

Last time I looked that was some handshake problem between intel (he uses intel hardware?) and that AVR. I think a firmware update is needed here.

He should try to set the refreshrate to 24 hz (not joking here) and retry. If that works - it's that bug.

So - not AE related, just bad luck :-)


RE: Testing audio engine ActiveAE - jjd-uk - 2014-03-31

Erm, these are music mp3 files so no video, but it is an Pioneer AVR he is connected to by HDMI.


RE: Testing audio engine ActiveAE - fritsch - 2014-03-31

Read again :-)

More clear: Those AVRs don't do 44.1 khz audio when the refreshrate is > 30hz which is a known bug between intel drivers and those AVRs (firmware).

Here link to intel forum: https://communities.intel.com/message/223769


RE: Testing audio engine ActiveAE - jjd-uk - 2014-03-31

Ah ok think I'm with you now, so you mean music playing with the GUI at 1080p and the desktop refresh rate set greater than 30hz will also be affected by the bug.

In which case Fixed has to be used? however that seems to be causing an issue with passthrough for the user.


RE: Testing audio engine ActiveAE - fritsch - 2014-03-31

He will get sound for 44.1 khz when he changes his refreshrate to something <= 30 hz.

He can use Fixed and resample everything to 48 khz. This will disable passthrough. We don't have a "minimal sample rate". He can patch out the 44.1 from the ELD info, but yeah - intel / pioneer needs to fix that.


RE: Testing audio engine ActiveAE - jjd-uk - 2014-03-31

Doh, I forgot that Fixed disables passthrough, that accounts for DTS not showing on AVR then, cheers fritsch.


Bitsreaming with XBMC Gotham - mstanic - 2014-04-02

I have an AMD 7970 running Windows 8.1 64bit and XBMC Gotham 32bit. I have it setup to bitstream but it's not giving me the HD lossless audio (DTS HDMA & Dolby True HD). I get 7.1 PCM for all of these HD lossless formats on my Anthem D2v preamp but this results in no sound from the surround rear channels..only getting 5.1 for these formats. I have tried various combinations of Audio Output device and Passthrough Output device and I either get 2.0 or 7.1 PCM or either or but sometimes with video stuttering depending on the combination. I have it set for WASAPI on both to get the 7.1 PCM and smooth playback but it's still not correct since my surround rears don't fire and I don't get the preamp showing the correct HD format. I'm obviously using HDMI from my video card to the D2v preamp.

Funny, my WD Live TV box plays all of my Bluray MKV's with no issues. These are the same rips that I am trying to play on my HTPC but do not bet the HD audio to bitstream properly as described above.


RE: Testing audio engine ActiveAE - fritsch - 2014-04-02

Your WD Live only does the core DTS or AC3. A lot of windows computers (especially with AMD cards) have a handshake problem with the AVR and therefore cannot play DTS-HD. There is a special thread in the Windows section done by jjd-uk to show workarounds.

Your preamp is not touched by us. 5.1 is obviously clear as there is no dts-hd ma decoder in the open source world, so only DTS is decoded. Remove the PreAmp out of the chain and test that first.


RE: Testing audio engine ActiveAE - mstanic - 2014-04-02

No, my WD Live TV does the full lossless tracks. When I play the ripped MKV Bluray off the WD Live TV, my Anthem D2v preamp clearly shows DTS HDMA or Dolby True HD and all of my speakers are firing. Only when I use XBMC, with the same MKV's, do I only get 7.1 PCM but only 5 speakers are firing so probably the core track in this case. Let me know if I'm misunderstanding something though.

Previous to going with XBMC, I was bitstreaming these MKV's with MPCHC and FFDSHOW flawlessly. However, something broke and I can't figure out how to make it work any longer. I switched to XBMC for this purpose but it looks like it's also not able to bitstream the full HD lossless tracks.


RE: Testing audio engine ActiveAE - fritsch - 2014-04-03

Nice, you are right, they updated their products: http://www.wdc.com/wdproducts/updates/?family=wdfwdtv_live_g3

Start posting logfiles and do the trouble shooting from the Windows Forum concerning audio and remove the preamp for a test.