INTERACT FORUM

Please login or register.

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

Author Topic: Is latency an issue  (Read 2247 times)

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Is latency an issue
« on: November 25, 2010, 12:46:53 pm »

Two obvious things too try
Disable NAV, it is known to hog the system now and then.
I agree with Glynor, this is a very likely cause.

Switch the Ayre back to USB class 1 and use native mode (MS) drivers
This to eliminate possible problems caused by theSycon USB class 2 driver.

You might have a look at tools like DPC Latency Checker
http://thewelltemperedcomputer.com/SW/Trouble/DropOut.htm

Logged

Frobozz

  • Citizen of the Universe
  • *****
  • Posts: 641
  • There is a small mailbox here.
Is latency an issue
« Reply #1 on: November 28, 2010, 12:25:08 am »

The wireless network driver is a common cause of audio glitches due to DPC latency.  Sometimes updating to the latest driver version can fix or reduce the problem.

Run the DPC Latency Checker that Vincent Kars mentioned: DPC Latency Checker

There is also another handy tool called LatencyMon that also checks DPC latency.

DPC Latency Checker gives a nice history bar graph of the latency times and makes it easy to see if there are spikes.  You can keep the latency checker running and visible and then check the graph for a recent spike in DPC latency times when you hear an audio glitch.

LatencyMon gives more info about which drivers are using DPC and which driver(s) are taking the most DPC latency.  So it's a better tool for tracking down the cause of DPC latency issues.  But I find DPC Latency Checker to be a better tool for a quick visual check.

When using these tools you'll get more accurate/reliable results if you disable CPU clock speed reduction.  Intel calls that SpeedStep.  AMD calls it Cool 'N Quiet.  Both throttle the CPU speed to save energy and reduce heat and the resulting fan noise.

If you have a laptop plug it in to AC power.  In the control panel power settings set the power plan to "high performance" and verify under advanced plan settings that the processor power management is set to 100% for both minimum processor state and maximum processor state.

You may also be able to disable the CPU throttling in your BIOS setup.

Then run one of the DPC latency tools and check if you've got a latency problem.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Is latency an issue
« Reply #2 on: November 28, 2010, 02:30:34 am »

The wireless network driver is a common cause of audio glitches due to DPC latency.  Sometimes updating to the latest driver version can fix or reduce the problem.

Run the DPC Latency Checker that Vincent Kars mentioned: DPC Latency Checker

There is also another handy tool called LatencyMon that also checks DPC latency.

I agree.  This is a good suggestion as well.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Is latency an issue
« Reply #3 on: November 28, 2010, 08:02:40 am »

Matt may have more to say about this, but I'm not in the latency checking camp.  I think this is a wild goose chase.

If the device has a buffer, MC should keep it full.  If not, the driver may not be doing its job.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Is latency an issue
« Reply #4 on: November 28, 2010, 10:35:59 am »

Matt may have more to say about this, but I'm not in the latency checking camp.  I think this is a wild goose chase.

I agree generally, though I have certainly had faulty network drivers cause audio problems (particularly old analog modems), and this could be one way to track it down.  However, I do often think the DPC Latency stuff is snakeoil as well.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Is latency an issue
« Reply #5 on: November 28, 2010, 11:17:46 am »

The LatencyMon (thanks for the link Frobozz) explains it nicely: http://www.resplendence.com/latencymon

You are running a quasi real time stream.
Quasi because the stream is buffered at the audio endpoint.
This buffering allows for some variation in the speed of the stream filling the buffer.

The moment the system is very busy with another task, you can get a buffer under-run and that is indeed what happens sometimes.
This is inherent to Win as it is not a real time OS so delivery of data in time is not guaranteed.

In Win you can give a application exclusive access to the audio endpoint.
You can also give this app a higher priority. Indeed this is one of the tricks to avoid buffer under run.
No snake oil involved.

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Is latency an issue
« Reply #6 on: November 28, 2010, 11:30:12 am »

Giving MC a higher priority is not a good idea. MC is multi-threaded so giving one part of the program a higher priority can have undesired side effects.

Let Windows and MC work it out.

If Windows itself is unavailable for long enough to create an audio gap, then something is not right with the OS or a driver.

I'm going to split this discussion to a new thread.
Logged

Frobozz

  • Citizen of the Universe
  • *****
  • Posts: 641
  • There is a small mailbox here.
Re: Is latency an issue
« Reply #7 on: November 28, 2010, 04:28:05 pm »

DPC latency isn't the only cause of audio glitches.  It's just one of several things that can cause audio glitches.  DPC latency does get a little too much focus in some circles for being THE cause of audio glitches.  It's just one possible cause.  Low DPC latency isn't a cure-all.

Chasing after impressively low DPC latency numbers for the sake of low latency numbers is also a bit silly.  Just because something can be measured and lower numbers are better doesn't mean the numbers have to be optimized to the lowest possible values.  Get them low enough and call it good.  Some people get a little bit too obsessed about low DPC latency numbers for home audio playback.  For pro audio recording I can see going for crazy low DPC latency numbers that never spike.  But pro audio recording is a whole different world than home audio playback with different requirements and needs.

For home audio just set the audio driver/device to buffer as many samples as it is capable of internally.  Set J River Media Center to buffer a reasonable amount.  With reasonable buffering both in the audio driver and in MC you should be able to ride out a few red spikes in DPC Latency Checker.  If the red spikes in DPC Latency Checker are big and frequent then you may get audio glitches, maybe.

I had a problem with my wired network driver causing high DPC latency.  High enough DPC latency that I was getting audio glitches.  Got the network driver sorted, DPC latency spikes went down, and audio glitches went away.  I still get some red spikes in the DPC Latency Checker, but audio is all good. 
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Is latency an issue
« Reply #8 on: November 29, 2010, 02:49:09 pm »

I just thought I'd say... I agree 100% with everything Frobozz just said.  That's what I meant when I said, vaguely, "I do often think the DPC Latency stuff is snakeoil as well".  Well said, sir.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up