[Windows] AudioEngine testers - Windows platform only

  Thread Rating:
  • 3 Votes - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
loekf Offline
Junior Member
Posts: 41
Joined: Apr 2012
Reputation: 0
Location: Netherlands
Post: #196
(2012-04-15 22:44)DDDamian Wrote:  @loekf - if you could make a <100mb clip and upload somewhere that would be great! Then I can check out the DTS pre-ambles on them and see how we analyze which type of DTS they are (there's actually many, including 14 & 16-bit).

I uploaded two clips to my public dropbox account:

http://dl.dropbox.com/u/9177341/Harry%20...le-001.mkv

http://dl.dropbox.com/u/9177341/The%20Ma...le-001.mkv

Hopefully they give some clues.
find quote
Dixon Butz Offline
Senior Member
Posts: 255
Joined: Dec 2010
Reputation: 3
Location: Hershey Highway
Post: #197
Those 2 samples skip for me on the last AE build on a Denon 1912

They play perfect on Danella's build.
find quote
loekf Offline
Junior Member
Posts: 41
Joined: Apr 2012
Reputation: 0
Location: Netherlands
Post: #198
Not sure if it makes any difference. Remuxed both clips to .ts and .m2ts

Result: same effect. Stuttering (.ts) or no audio at all (m2ts)

Question: should it matter whether you use DirectSound or WASAPI ? So far I'm using DirectSound: AMD HDMI output device.
(This post was last modified: 2012-04-16 22:44 by loekf.)
find quote
loekf Offline
Junior Member
Posts: 41
Joined: Apr 2012
Reputation: 0
Location: Netherlands
Post: #199
@DDDamian: now I got streaming for all formats working using the DanielaE patch, what's the situation with WASAPI in AudioEngine ?

In AE, there's no explicit choice between DirectSound and WASAPI and the exclusive mode is missing. Does this mean that "under water" the AE code selects WASAPI and exlusive mode all by itself ? Appearently in the DanielaE patch there was a relation between not being in WASAPI mode and DTS-ES.

BTW, any luck with those DTS streams I uploaded ?
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #200
Heh, yes I remember making that suggestion in that thread. AE does have the exclusive option, and uses WASAPI by default if that is your Windows setting. WASAPI is the only way to go for quality audio output in Windows, so we default to it unless you force DirectSound with the setting shown in post 2 of this thread.

Be careful switching between the two - AE uses some different settings in guisettings.xml - that's probably why you don't see Exclusive Mode in AE. If you're switching between the two then keep two versions of that file - just rename them accordingly and have the correct one active at the time.

Will be looking at your sample later this evening once I've finished some more commits to the branch - I'll post any findings here.
find quote
loekf Offline
Junior Member
Posts: 41
Joined: Apr 2012
Reputation: 0
Location: Netherlands
Post: #201
(2012-04-17 00:10)DDDamian Wrote:  Heh, yes I remember making that suggestion in that thread. AE does have the exclusive option, and uses WASAPI by default if that is your Windows setting. WASAPI is the only way to go for quality audio output in Windows, so we default to it unless you force DirectSound with the setting shown in post 2 of this thread.

Be careful switching between the two - AE uses some different settings in guisettings.xml - that's probably why you don't see Exclusive Mode in AE. If you're switching between the two then keep two versions of that file - just rename them accordingly and have the correct one active at the time.

Will be looking at your sample later this evening once I've finished some more commits to the branch - I'll post any findings here.

Hmm... I'm sure I did a complete uninstall before switching to either AE or Eden + HD audio patch (complete as in also removing the complete profile settings)

EDIT: I'm sure Exclusive was there. Just not sure now whether exclusive was "on" when I tried those failling DTS tracks with AE
(This post was last modified: 2012-04-17 00:23 by loekf.)
find quote
liquidskin76 Offline
Skilled Skinner
Posts: 1,358
Joined: Aug 2009
Reputation: 17
Location: Arkham, Gotham City
Post: #202
Hey DDDamian,

I've been doing some testing to try and get to the bottom of the sync issue i was seeing. Anyway, i started from fresh with a clean install of your most recent AE build. I've created two DTS-HD clips. Both are a straight remux from BD backups, so no reencoding of video.

Guess what... i'm still seeing the old 24p 250ms delay issue with match refresh rate!

You'll be relieved to hear though that i'm also seeing the exact same problem with mpc-hc and directshow filters, like lav or ffdshow!!!

Wonder what the hell could be causing it for some people, however not for others. Huh I've turn video processing like motionflow off, so don't think it's TV related. I've seen this on a Samsung and Sony. Maybe av receiver related? I've always had Sony receivers.

Anyway... global av delay patch, or mux with audio delay here i come!

Cheers mate... really looking forward to seeing ae hit master. Looks like it very very very very close now! Big Grin

HTPC: Streacom F1C | Asus H87I-Plus ITX | Intel Core i5-4670T | Kingston HyperX SSD | Kingston DDR3 RAM
Home AV: Sony KDL-40HX723 | Sky+HD | Sony BDP-S480 BD Player | Sony STR-DH820 AV Receiver | Sony 5.1 Speaker System | Sony PS3 Slim | Logitech Harmony Touch
(This post was last modified: 2012-04-17 01:07 by liquidskin76.)
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #203
Hi Liquidskin - any chance it's the muxer you're using? Tried an alternative? If you try another and see the same thing then make a <100mb sample and upload it. My system has always had excellent sync with few exceptions. If it is out on yours and good on mine we can definitely rule out software (especially if you're seeing it in MPC-HD/VLC).

Some receivers also have a lipsync feature to synchronize a/v. My Denon does, and I'm sure others do. This was originally part of the HDMI specifications but never followed through on by many manufacturers, both of receivers and TVs. Check if your Sony has it and try enable it if so.
find quote
liquidskin76 Offline
Skilled Skinner
Posts: 1,358
Joined: Aug 2009
Reputation: 17
Location: Arkham, Gotham City
Post: #204
(2012-04-17 01:21)DDDamian Wrote:  Hi Liquidskin - any chance it's the muxer you're using? Tried an alternative? If you try another and see the same thing then make a <100mb sample and upload it. My system has always had excellent sync with few exceptions. If it is out on yours and good on mine we can definitely rule out software (especially if you're seeing it in MPC-HD/VLC).

Some receivers also have a lipsync feature to synchronize a/v. My Denon does, and I'm sure others do. This was originally part of the HDMI specifications but never followed through on by many manufacturers, both of receivers and TVs. Check if your Sony has it and try enable it if so.

Regarding muxer, i see it using mkvmerge and makemkv. I'll try a raw m2ts as a precaution. I'll upload the clips for you to test.

My receiver has a delay option, however nothing to sync automatically. 25hz material is fine. 24p stuff at 60hz with 2:3 pulldown is fine. Hell, even 24p bd discs on my Sony blu-ray are fine!!

See how you get on with the samples. I'll get them uploaded tomorrow.

Cheers

HTPC: Streacom F1C | Asus H87I-Plus ITX | Intel Core i5-4670T | Kingston HyperX SSD | Kingston DDR3 RAM
Home AV: Sony KDL-40HX723 | Sky+HD | Sony BDP-S480 BD Player | Sony STR-DH820 AV Receiver | Sony 5.1 Speaker System | Sony PS3 Slim | Logitech Harmony Touch
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #205
Thx liquidskin, and I've said it before in other threads, I can't recommend an ATI 6450 enough for great sync on 23.976 film.
find quote
liquidskin76 Offline
Skilled Skinner
Posts: 1,358
Joined: Aug 2009
Reputation: 17
Location: Arkham, Gotham City
Post: #206
(2012-04-17 01:51)DDDamian Wrote:  Thx liquidskin, and I've said it before in other threads, I can't recommend an ATI 6450 enough for great sync on 23.976 film.

Thats what i'm using!! I also see the same problem using a nvidia gt 520.

Cheers

HTPC: Streacom F1C | Asus H87I-Plus ITX | Intel Core i5-4670T | Kingston HyperX SSD | Kingston DDR3 RAM
Home AV: Sony KDL-40HX723 | Sky+HD | Sony BDP-S480 BD Player | Sony STR-DH820 AV Receiver | Sony 5.1 Speaker System | Sony PS3 Slim | Logitech Harmony Touch
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #207
Hmmm definitely sounds like the receiver then (again assuming mux is good). But in theory there should be no difference in the output from XBMC and your GPU vs a standalone player. Of course Windows and audio drivers also stand between those...

And apologies - I should have remembered you have the same GPU - just read so many logs and posts trying to help folks out here.
(This post was last modified: 2012-04-17 02:26 by DDDamian.)
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #208
Posted this in another thread - thought it might be good here too:

Just a little tutorial:

Since Vista SP1, Windows has two primary audio interfaces, DirectSound and Wasapi (Windows Audio Session Application Programming Interface). The latter was a replacement for XP's Kernal Streaming mode.

DirectSound acts as a program-friendly middle layer between the program and the audio driver, which in turn speaks to the audio hardware. With DS, Windows controls the sample rate, channel layout and other details of the audio stream. Every program using sound passes it's data to DS, which then resamples as required so it can mix audio streams from any program together with system sounds.

The advantages are that programs don't need resampling code or other complexities, and any program can play sounds at the same time as others, or the same time as system sounds, because they are all mixed to one format.

The disadvantages are that other programs can play at the same time, and that a program's output gets mixed to whatever the system's settings are. This means the program cannnot control the sampling rate, channel count, format, etc. Even more important for this thread is that you cannot pass through encoded formats, as DS will not decode them and it would otherwise bit-mangle them, and there is a loss of sonic quality involved in the mixing and resampling.

Partly to allow for cleaner, uncompromised or encoded audio, and for low-latency requirements like mixing and recording, MS re-vamped their Kernal Streaming mode from XP and came up with WASAPI.

WASAPI itself has two modes, shared and exclusive. Shared mode is in many ways similar to DS, so I won't cover it here.

WASAPI exclusive mode bypasses the mixing/resampling layers of DS, and allows the application to negotiate directly with the audio driver what format it wishes to present the data in. This often involves some back-and-forth depending on the format specified and the device's capabilities. Once a format is agreed upon, the application decides how it will present the data stream.

The normal manner is in push mode - a buffer is created which the audio device draws from, and the application pushes as much data in as it can to keep that buffer full. To do this it must constantly monitor the levels in the buffer, with short "sleeps" in between to allow other threads to run.

WASAPI, and most modern sound devices, also support a "pull" or "event-driven" mode. In this mode two buffers are used. The application gives the audio driver a call-back address or function, fills one buffer and starts playback, then goes off to do other processing. It can forget about the data stream for a while. Whenever one of the two buffers is empty, the audio driver "calls you back", and gives you the address of the empty buffer. You fill this and go your way again. Between the two buffers there is a ping-pong action: one is in use and draining, the other is full and ready. As soon as the first is emptied the buffers are switched, and you are called upon to fill the empty one. So audio data is being "pulled" from the application by the audio driver, as opposed to "pushed" by the application.

WASAPI data is passed-through as-is, which is why you must negotiate capabilities with the audio driver (i.e. it must be compatible with the format you want to send it as there is no DS between to convert it), and why encoded formats like DTS can reach the receiver unchanged for decoding there.

Because WASAPI performs no mixing or resampling, it is best used in the exclusive mode, and as a result the application gets the exclusive rights to the audio buffers, to the exclusion of all other sounds or players. WASAPI shared mode does allow this, but that's not a common mode and not what we want for an HTPC. I myself have a dislike of Window's cutesy system sounds happening at 110db

Hope some of you found today's primer of use. Please pick up a scorecard from the desk and drop it in the big round "collection box" on your way out

Cheers,
Damian

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
(This post was last modified: 2012-04-17 02:50 by DDDamian.)
find quote
Aemstel Offline
Member
Posts: 82
Joined: Feb 2011
Reputation: 0
Post: #209
Thanks for that explanation Damian! Very nice to know a little better what's actually going on.
(This post was last modified: 2012-04-17 08:20 by Aemstel.)
find quote
loekf Offline
Junior Member
Posts: 41
Joined: Apr 2012
Reputation: 0
Location: Netherlands
Post: #210
Also from my side, excellent explanation what's going with WASAPI vs. DirectSound !

Makes a lot of sense only to do bitstreaming in WASAPI. Maybe I'll give AE another chance tonight by doing a carefull uninstall of the DanielaE patch first.

HTPC: MS-Tech MC-1200 | Asus F1A75-M | AMD A6 3650 | OCZ Agility3 120GB | Corsair Vengeance 2x4GB DDR3| LiteOn iHOS104 BDR | Win7 x64 (Catalyst 12.4) | XBMC 12.0-ALPHA2 Git:20120512-694a759
Home AV: Philips 37PFL5603 | UPC Mediabox | Philips BDP7600/12 | Onkyo TX-NR609 | Sony PS3 Slim | Logitech Harmony One | Sonos audio | Apple TV | 5.1 speakers (TMA, Phonar)
(This post was last modified: 2012-04-17 14:39 by loekf.)
find quote
Post Reply