INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: WASAPI buffering problem?  (Read 5709 times)

raym

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3583
WASAPI buffering problem?
« on: February 05, 2010, 04:27:54 am »

I'm experiencing an issue with music played via WASAPI over HDMI (HD4550 card) to my receiver which may or may not be related to the recent DSP changes.... When I start playback of any audio track (predominantly lame encoded vbr mp3s), I never hear the first split second of the song. No fade in or anything like that. I miss the first beat of the tune everytime. I can minimise the issue by reducing the buffer time but it never completely goes away, even with DSP effects (EQ / Replay Gain) disabled. Interestingly, if I choose DirectSound, its ok but I'd rather use WASAPI. I'm playing the audio from a network share but copying them locally makes no difference. Tried changing to internal volume (from system) too but to no avail. I understand the importance of buffering but perhaps there's a problem here?
Windows 7 HP x64.
Thanks.
Logged
RKM Smart Home - www.rkmsmarthome.com.au
Z-Wave Home Automation

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: WASAPI buffering problem?
« Reply #1 on: February 05, 2010, 08:58:56 am »

Is it possible your receiver is eating the first little bit as it figures out the format?

Is anyone else seeing this?

We don't completely fill the card buffers before starting playback.  Filling and playing happen at the same time.

It's possible starting then filling or filling completely then starting would fix it.  We'll test with our ATI over HDMI in a few days and see what we find.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: WASAPI buffering problem?
« Reply #2 on: February 05, 2010, 09:24:01 am »

If you don't mind, test again with build 140.

We're filling the buffers completely before starting.  I wouldn't really expect it to make a difference, but the ATI hardware has been a bit special in other regards.

Thanks.
Logged
Matt Ashland, JRiver Media Center

Mike Noe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 792
Re: WASAPI buffering problem?
« Reply #3 on: February 05, 2010, 10:29:02 am »

This sounds like a known issue with the ATI HDMI driver.   Have you tried the Realtek ATI HDMI driver?
Logged
openSUSE TW/Plasma5 x86_64 | Win10Pro/RX560
S.M.S.L USB-DAC => Transcendent GG Pre (kit) => Transcendent mono OTLs (kit)
(heavily modded) Hammer Dynamics Super-12s (kit)
(optionally) VonSchweikert VR8s

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: WASAPI buffering problem?
« Reply #4 on: February 05, 2010, 01:26:06 pm »

This sounds like a known issue with the ATI HDMI driver.   Have you tried the Realtek ATI HDMI driver?

+1 on this - I tested WASAPI vs DirectSound playback over HDMI on my ATI HD4550 and I have no such issue (both with and without DSP on - eg I see the Receiver change to 2ch then play the first notes jsut fine).  I use the Realtek ATI HDMI Driver.

>> www.realtek.com --> downloads --> high definition audio codecs --> "i accept the above" / next --> ATI HDMI AUDIO DEVICE
Logged
JRiver CEO Elect

raym

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3583
Re: WASAPI buffering problem?
« Reply #5 on: February 05, 2010, 04:39:39 pm »

If you don't mind, test again with build 140.

Thanks Matt. I will try the next build and report back.

This sounds like a known issue with the ATI HDMI driver.   Have you tried the Realtek ATI HDMI driver?

I didn't know there was an alternative! Ok, I'll try this too. Where have you heard of this being a known issue?

Thanks to all.
Logged
RKM Smart Home - www.rkmsmarthome.com.au
Z-Wave Home Automation

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: WASAPI buffering problem?
« Reply #6 on: February 05, 2010, 05:04:57 pm »

Initially there was only the Realtek drivers (CCC did not come with one).  When ATI bundled their own the issue was termed "silent stream" or something.  From memory - the ATI driver did not hold the Audio comms open and had to reestablish it each time.  The result for many was noticing that Windows sounds were getting clipped.  There is was also a difference between what bit depths the two drivers supported with WASAPI.  Most stuck with the Reltek drivers (I've not tried the ATI ones for some time however so I don't know if it was ever fixed....).
Logged
JRiver CEO Elect

raym

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3583
Re: WASAPI buffering problem?
« Reply #7 on: February 06, 2010, 04:10:07 am »

If you don't mind, test again with build 140.

With the ATI drivers, I don't hear any change unfortunately.

I tried the Realtek drivers and, well, it's still the same  :-\  Let me just re-iterate that the problem occurs ONLY when I first hit play and when nothing else is playing. Switching tracks etc from a playing state is ok. And you really need to test with a song that "screems" right into it as soon as you press PLAY.

Is it possible your receiver is eating the first little bit as it figures out the format?

Maybe, but again, only with WASAPI is this occuring. If I reduce the buffer really low to 0.15 secs (or thereabouts), the PCM lights on my receiver stay active even when the song stops playing. This fixes the problem but I end up with clicks and pops during other PC activities. If I increase the buffer time, the PCM lights go away once the song stops playing. It's as if a connection is lost to the receiver when long buffer times are used.

Would a log file be of any assistence?
Logged
RKM Smart Home - www.rkmsmarthome.com.au
Z-Wave Home Automation

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: WASAPI buffering problem?
« Reply #8 on: February 06, 2010, 03:26:18 pm »

Yup the dropped Audio connection WAS a problem (I just can not remember what the "fix" was or even what cobo of HW had the issues - I had a G33 prior to the 4550).  I always have my PCM lights with the receiver on so there is no lost time with a connection to establish.  Couple of configuration notes on my setup:

Windows 7 Sound Setup (from sys tray)
- Realtek HDMI Output (Default Device) - rest are "Not Plugged in" or with SPDIF it is "Disabled"
Realtek HDMI Output --> Properties
- Enhancements - I normally have these all disabled but I see I've got Immediate mode check (no idea what it does)
- Advanced --> 24-bit, 96000hz for the default format.  Under Exclusive Mode both "Allow applications....." and "Give exclusive mode..." are checked
Reltek HDMI Output --> Configure
-Set it to your default speaker config - eg 5.1
MC Options --> Playback -> Audio
- Output Model: WASAPI
- Output Mode Setting: Device = "Defaults" and all three options are checked. Buffering for me is .51 sec

Couple of notes of behavior:
1) When rebooting the 5.1 PCM lights come on
2) When using RECLOCK's WASAPI implementation, you will see the PCM lights change to the correct channel configuration (eg say 2ch) and when playback stops it will go back to the default 5.1
3) When using MC's WASAPI implementation, you will see the PCM lights change to the correct channel configuration (eg say 2ch) but when playback stops it will stay on that config till the next item plays
4) If you go into the Sys Tray --> Audio --> Playback Devices --> Reltek --> Configure --> Test it should change the config back to your default 5.1 on your receiver and play the test tones
5) PCM lights on the receiver always stay lit as per the above

FYI - The only diff I've got is I have a DVI Detective+ between my HD4550 and Receiver to keep the EDID data flowing back to the HTPC even when the reciever is switched away from the HTPC input or the TV is turned off.  This was to fix problem where you switch the receiver away from the HTPC and the PC sees that the deivce has "gone" (eg it becomes headless).  Some HW/SW combo would reportably then reconfigure the screen to Windows Default resolution or sound to 2ch....in my case if sound was playing it would crash MC as the "renderer" would be lost.  I dont' think that the DVI Detective+ helps in your case but it may also have an impact.

Thanks
Nahtan
Logged
JRiver CEO Elect

raym

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3583
Re: WASAPI buffering problem?
« Reply #9 on: February 11, 2010, 07:50:48 am »

Hi Matt. Let me know what you find when you get a chance to play with this. I've done a lot of testing and cannot solve this one. I get ok results by reducing the buffer size but this just introduces other issues.  I can confirm that my receiver PCM lights are always on even when the song is stopped so I know it's not wasting time switching the appropriate input or channels. I've also tried the alternate audio drivers as suggested here but the result is the same.

Thanks.   
Logged
RKM Smart Home - www.rkmsmarthome.com.au
Z-Wave Home Automation

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: WASAPI buffering problem?
« Reply #10 on: February 11, 2010, 08:01:44 am »

Do you have an optical connection you could test?  That would tell you whether the problem is related to the ATI card.
Logged

raym

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3583
Re: WASAPI buffering problem?
« Reply #11 on: February 11, 2010, 08:13:26 am »

Do you have an optical connection you could test?  That would tell you whether the problem is related to the ATI card.

I had a similar idea and tried that early on.  Same problem there I'm afraid.
Logged
RKM Smart Home - www.rkmsmarthome.com.au
Z-Wave Home Automation

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: WASAPI buffering problem?
« Reply #12 on: February 11, 2010, 09:33:50 am »

I made a test file with a fraction of a second of noise followed by lots of silence.

I've tested a few soundcards (although not an ATI w/HDMI) and none of them drop the burst of noise -- using either analog or SPDIF output.  So this sort of points to an ATI driver bug or configuration issue.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: WASAPI buffering problem?
« Reply #13 on: February 11, 2010, 09:39:21 am »

Here's a copy of the test file (be sure to disable skipping of silence in Options > Audio):
http://files.jriver.com/temp/Burst.ape

Another data point is that I can get a Sony amp to drop the burst if it's changing sample rates when it starts playback.  I'm looking at it, but I think it's the amp's fault.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: WASAPI buffering problem?
« Reply #14 on: February 11, 2010, 04:37:58 pm »

Next build:
NEW: Added WASAPI option: Flush device buffers on startup (use if you hear a tick or miss part of the start).

Let us know if it helps.
Logged
Matt Ashland, JRiver Media Center

raym

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3583
Re: WASAPI buffering problem?
« Reply #15 on: February 12, 2010, 04:19:25 am »

Next build:
NEW: Added WASAPI option: Flush device buffers on startup (use if you hear a tick or miss part of the start).

Let us know if it helps.

Well Matt, you've done it again! Fixed!! I cannot fault it now.  ;D ;D ;D  Thanks heaps.

Time to enjoy the music.....
Logged
RKM Smart Home - www.rkmsmarthome.com.au
Z-Wave Home Automation
Pages: [1]   Go Up