Solved AMD & NVIDIA HDMI Audio lag FIX
#1
I've used three different set ups since XBMC 9 and all have the same issue.

Applies to: XBMC 9, 10, 11 and 12 (Frodo)


Image

The Issue
There is a 1-2 second gap in the audio when initialising audio streams - this is caused by the receiver (Sony and Onkyo are well known for this) and the drivers from AMD/Realtek.

Here is an explanation from the authors websites:
Quote:A/V receivers have to switch to the appropriate mode every time an audio stream is presented to them. This in itself isn't a problem, but in Windows, when the sound device is configured with more than two channels, the receiver has to switch modes every time Windows plays a system sound, a video in youtube, an mp3 in Windows Media Player etc. Because it takes the receiver time to switch modes, this leads to the first second or two of the sound being missed, which in the case of system sounds, often means the whole sound is missed.

The Fix
Download AVR Audio Guard

Image

What does it do?
AVRAG maintains a connection between your HTPC (over HDMI) and AV Receiver, this removes the 1-2 second lag time and means audio plays as it should do.

Here is an explanation from the authors website:
Quote:AVR AUDIO GUARD sends a silent WASAPI shared-mode audio stream to your receiver, and keeps the stream open so the receiver does not need to switch modes to play other shared-mode streams. It means you don't miss any system or application sounds, and when an exclusive-mode application such as a bitstreaming media player requests access, AVR AUDIO GUARD pauses and lets it take over until it is finished, and then starts the silent stream again.

Do I need it?
If you have this issue on your system you will know exactly what I mean and it's worth installing, it runs as a small app in the background.

Hasn't this been posted before?
Yes it has. It's in a few threads but it's taken me two years to find this app and I couldn't find a solution through the forum. Maybe my search skills aren't good or maybe no one posted it in one of my threads - either way I thought I would make this post to help others.
Please read the online manual (wiki) & FAQ (wiki) before posting.

Skins: Estuary | Xperience1080
Opinion: Never purchase HTC products
Reply
#2
Probably useful in versions 11 and below, but not for 12 (Frodo). In fact, the new AudioEngine in Frodo has a streamsilence option in advancedsettings.xml that will do this for you.

The WASAPI shared mode nature of this program will probably mess with Frodo's audio as well, as I think it needs to be in exclusive mode for some things to work correctly (bitstreaming?).
HP Stream Mini w/Libreelec -> HDMI -> Toshiba 37"
Intel NUC8i3BEH w/Libreelec -> HDMI -> LG OLED55C3PUA -> S/PDIF -> Sony HT-CT80
Dell Optiplex 7050 Micro w/Libreelec -> HDMI -> Yamaha RX-V467 -> HDMI -> Toshiba 47L7200U
Reply
#3
Correct on both counts Jogee. And the first thing I do on a Windows HTPC is disable Windows system sounds.
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!
Reply
#4
I tried the above options including the advanced settings and none of them worked - that's on two entirely different machines, different hardware and even different Frodo builds. I only posted the above for people who, like me, couldn't get the issue to resolve. It works perfectly on Frodo RC3 for me. System sounds are always disabled on my HTPC but the issue persisted. AVR detects when an app requests exclusive mode and disables itself. Either way it works on my HTPC and after asking around on the forum for a year and searching for two years nothing that was suggested worked.

The early AE builds diid help a bit but since Frodo the lag became more noticeable.
Please read the online manual (wiki) & FAQ (wiki) before posting.

Skins: Estuary | Xperience1080
Opinion: Never purchase HTC products
Reply
#5
Is this only an issue when windows itself is configured for more than 2 speakers? I always have it set to stereo as it's the only way I get WMC + XBMC working 100%. The application is configured for 7.1. Is there any reason why windows should be configured correctly for your sound setup?

I have an Onkyo and with this setup I don't get any delays. However I also use a HDMI Detective to remove issues in WMC with HDCP sync problems but the above was true before I added that anyway.
Reply
#6
On each system I've tried I only set it to two speakers on HDMI, disable all Windows system sounds and give XBMC exclusive use of the hardware. I've tried 2 different AV receivers (Onkyo and Sony) and the same issue occurred.

Here are some of the set ups
- Windows 7
- Windows 8
- Vista
- NVIDIA Hardware
- ATI/AMD Hardware
- Different Drivers
- Entirely different hardware set ups
- Different HDMI cables
.... the list goes on.

It's been an issue since I first started using XBMC but worked fine on WMC+Mediabrowser and doesn't happen when using MPC-HC so it's definitely an issue with WASAPI,
Please read the online manual (wiki) & FAQ (wiki) before posting.

Skins: Estuary | Xperience1080
Opinion: Never purchase HTC products
Reply
#7
Thanks for posting this piers, I'm glad it was of use to you Smile

Marc - Author of AVR Audio Guard
Reply
#8
I really do not get what this program does that the streamsilence option does not.
Reply
#9
It's not designed for xbmc but apparently it's helped at least one person! The streamsilence option (if i'm understanding it correctly) does something different anyway if as I understand it sends a second or so of silent bitstream to the receiver before the actual bitstream so the first part of the bitstream isn't missed. My program is aimed more towards preventing that missed segment on non bitstream audio.
Reply
#10
Cheers Marc for explaining that! It's a very useful program.
Please read the online manual (wiki) & FAQ (wiki) before posting.

Skins: Estuary | Xperience1080
Opinion: Never purchase HTC products
Reply
#11
Thumbs Up 
Awesome!!! Perfect!! Great job!
Rofl
Reply
#12
So I swapped out the noisy overkill Nvidia gaming card in my HTPC for a nice silent AMD fanless card hooked up to my Sharp TV, and lo and behold this problem crops up. It wasn't that big of a deal in XBMC because movies rarely start with any audio, and it only affected a few TV shows. But...

...I set up foobar to play my music over the TV when I didn't want to wake up the neighborhood at 3 AM, and guess what? Same problem. Except now it's extremely annoying losing the first couple seconds of every song.

AVR Audio Guard fixed everything in XBMC and foobar. I don't know or care how. I just did the one click install and everything is perfect now. So thank you, Marc, for writing the program in the first place. And thank you, Piers, for describing the problem well enough for Google to bring me here.

PS – this didn't happen on a typical home theater receiver with multi channel sound, either. Just a regular TV in stereo.
Reply
#13
(2013-03-08, 16:01)marcd2k13 Wrote: It's not designed for xbmc but apparently it's helped at least one person! The streamsilence option (if i'm understanding it correctly) does something different anyway if as I understand it sends a second or so of silent bitstream to the receiver before the actual bitstream so the first part of the bitstream isn't missed. My program is aimed more towards preventing that missed segment on non bitstream audio.

That is not what the streamsilence option does.

It sends a very soft (inaudible) audio stream to the AVR continuously when no sound is played, preventing it from going into sleep mode, whether passthrough is used or not.

In Gotham you can also allow streamsilence to quit after a certain amount of minutes so that your AVR will go into sleep mode after that time, for example after 30 minutes.
Reply

Logout Mark Read Team Forum Stats Members Help
AMD & NVIDIA HDMI Audio lag FIX0