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 - FernetMenta - 2013-08-11

currently none of the sinks does support planar format. this has to be added explicitly to the sinks. see line 794 and following of WASAPI. there is nothing which differentiates a planar format from interleaved.
line 1041 of WASAPI: requesting FLOATP has resulted in requesting a bitstream format which must have clearly failed.

we can add a macro AE_IS_PLANAR to AEDataFormat, then sinks can check for planar support.


RE: Testing audio engine ActiveAE - fritsch - 2013-08-11

That sounds good. Will do.

Edit: was rather trivial. I replied to the git discussion.


RE: Testing audio engine ActiveAE - Voyager - 2013-08-11

(2013-08-11, 08:25)Voyager Wrote: I just discovered an issue with sync playback to display. When choosing audio clock you get heavy stuttering, e.g. When playing back 23.976 fps on a 24hz display, I got something around 5 fps... Note my audio is 5.1 digital over SPDIF. This was working fine with SoftAE.

Now switching to videoclock dupe/drop solved that issue for me.

Update on my earlier post: I can't get ActiveAE to work at all on my E-450 HTPC (however it seems to be OK on another machine, Core i7 / NVidia GPU). The log (here) seems to show that the sink opened is not compatible: CActiveAE::OpenSink - sink incompatible, re-starting... I'm going to look further, but would appreciate any input. Could it be related to the device enumeration thing that was discussed in this thread as well?


RE: Testing audio engine ActiveAE - fritsch - 2013-08-11

@Voyager
Can you add the PR fernetmenta did here: https://github.com/xbmc/xbmc/pull/3095


RE: Testing audio engine ActiveAE - Voyager - 2013-08-11

I can't at the moment, but I have just succeeded in making it work with DirectSound. So it has to be WASAPI... I 'll report back as soon as I have tested a new build with that PR.


RE: Testing audio engine ActiveAE - fritsch - 2013-08-11

Oki - should work with Wasapi after that commit, too.


RE: Testing audio engine ActiveAE - WiSo - 2013-08-11

@FernetMenta, fritsch on irc: thanks for the explanation.


RE: Testing audio engine ActiveAE - Voyager - 2013-08-11

update on the situation: still no luck. I've added commits from PR 3095 and it didn't change much, WASAPI over SPDIF is still a no-go on my E450.

See log here: http://xbmclogs.com/show.php?id=44409 (at line 442 I've changed to log level 2 - and at line 17498 the interesting stuff begins).


RE: Testing audio engine ActiveAE - FernetMenta - 2013-08-12

I think the problem here is the huge buffer (period size) of the sink:

Code:
22:02:13 T:2340   DEBUG:   Output Device : SPDIF - Realtek Digital Output (Realtek High Definition Audio)
22:02:13 T:2340   DEBUG:   Sample Rate   : 48000
22:02:13 T:2340   DEBUG:   Sample Format : AE_FMT_S16NE
22:02:13 T:2340   DEBUG:   Channel Count : 2
22:02:13 T:2340   DEBUG:   Channel Layout: RAW,RAW
22:02:13 T:2340   DEBUG:   Frames        : 7200
22:02:13 T:2340   DEBUG:   Frame Samples : 14400
22:02:13 T:2340   DEBUG:   Frame Size    : 4

ActiveAE allocates buffers with the same size, those buffers flow through the various stages. In this case the internal water level of 250ms is reached with two buffers. I think there's some kind of starvation problem. Investigating ...


RE: Testing audio engine ActiveAE - Voyager - 2013-08-12

FernetMenta, I have finally resolved the problem thanks to a tip in your last post. I have simply removed the advancedsetting I had:

<audiosinkbufferdurationmsec>150</audiosinkbufferdurationmsec>

This was a remnant from the 'old' AE tuning, but I guess the default value works better :-)


RE: Testing audio engine ActiveAE - da-anda - 2013-08-12

@FernetMenta - well, all I did to crash XBMC was playing music (MP3) and cycling/switching audio devices while waitng on each device to output sound (or at least ~3-5 secs) before going to the next (directsound/wasapi, spif/hdmi).

"Output stereo to all speakers" also doesn't really work like mentioned before. I noticed that I at least get sound when using directsound, but it's a) not 5.1 (AVR still is showing stereo) and b) really low/quiet and thus barely noticable (adjust volume on downmix is enabled). I don't get any sound at all with it enabled on WASAPI sinks, regardfless of SPDIF or HDMI.


RE: Testing audio engine ActiveAE - FernetMenta - 2013-08-12

@da-anda - your log states that you use SPDIF. this is limited to two channels PCM. In order to get 5.1 over SPDIF, the engine needs to transcode to AC3. I have added the upmix option to the decision for engaging transcode. see: https://github.com/xbmc/xbmc/pull/3095. It does include another fix for WASAPI which could fix the no-sound issue for transcoding.


RE: Testing audio engine ActiveAE - da-anda - 2013-08-12

thanks, will test your PR


RE: Testing audio engine ActiveAE - Ace - 2013-08-12

Hi, two things I've noticed:
  1. after seeking backwards a/v sync is lost. Pausing it for a while and press play starts fist audio and than video, then a/v is synced again.
  2. pausing and then stopping does not stop audio immediately (i.e. audio is audible for some ms))

Debug log:http://xbmclogs.com/show.php?id=44555


RE: Testing audio engine ActiveAE - Martijn - 2013-08-12

(2013-08-12, 12:40)ace20022 Wrote: Hi, two things I've noticed:
  1. pausing and then stopping does not stop audio immediately (i.e. audio is audible for some ms))
the same happens when stopping without pausing