how to reduce audio latency?
Dec 7, 2020 at 5:15 AM Thread Starter Post #1 of 26

deama

New Head-Fier
Joined
Apr 7, 2020
Posts
36
Likes
1
Location
UK
I have a focusrite scarlett 2i2 3rd gen, a USB DAC.
What I essentially want is to reduce the overall system audio latency (windows). If I just use the DAC by itself without any software, I get about 70ms audio latency.
I use audacity to measure the latency by generating a ping* sound, then putting my headphones close to my microphone and record it; then I calculate the delay.

So far I've installed voicemeter and hooked up my focusrite to it. I am able to use ASIO drivers for my A1 with the focusrite, so I select this. In the system settings I leave everything at default (don't touch), engine mode on normal and WDM on NO. For reference, my focusrite's buffer size by default is set to 16.
So I go ahead and open up the VB virtual cable control panel for voicemeter, the smp latency is set to 7168, ok that's fine for now.
I then go ahead and set my voicemeter as my default playback device and start to listen to some music I have and immediately I get massive pops, cracks, and distortions. I'm thinking the buffer size is too big, so I put it to 64 from 16. Now it sounds fine, no problem, however sometimes it seemingly randomly does small pops and cracks; sometimes it goes through phases that make it do it more often than before, then it calms down, and then a few minutes later starts to do it more often for 10 seconds or so, then calms down, etc...

So I'm thinking maybe the buffer size is too small? So I increase it to 128 from 64 and I immediately get massive pops and cracks and distortions, like with the 16 setting. I then try the buffer size 96 setting, and I'm honestly not sure if it improves it or not because of how random these pops and cracks are, if I had to pick, I think no? I go ahead and play with different buffer size settings, ranging from 32 to 48, to 64, and 96, but the results are all roughly the same, if I had to pick though, I think maybe 64 is best, but I've had moments where 32 seemed better, sometimes 96 was better, etc... it's too random and the difference is too miniscule.

So I'm thinking maybe the smp latency is too low in the virtual cable control panel, so I go ahead and crank it up all the way to 24576, however, no difference. Just out of experimentation, I tried playing with different smp latency settings, but they all perform the same, except for the very, very low settings (less than 1536) wherein they start to distort more and give more cracks and pops.

Anyone got any ideas? I tried the other driver modes in A1, but their much worse. If they do work perfectly (without pops and cracks) the latency ends up being several times higher than just using my DAC bare.

I've also tried reinstalling everything, but no difference.

Is there maybe a way to access more advanced features of my DAC or hack the driver to push the latency lower?
 
Dec 12, 2020 at 5:18 AM Post #2 of 26
In term of audible delay unrelated to artifacts, I can only think of the "direct monitor" button having a noticeable impact on my old version of the 2I2. But from what I get, you don't really
care about reducing latency itself, but instead you'd like to solve your audio artifacts problem that could be caused by latency settings. Am I correct about that?

About all the buffer and resulting sound issues, I have a hard time isolating the cause based on what you said. Have you clearly determined if the problem comes from the recording side or from the playback side? If you forget about the virtual cable for a time and just record ambient sounds in audacity, do you get artifacts on replay? If so is it always at the same time on the playback? And if so, can you see the artifact in the sound wave in audacity?
Whatever the result, that should clearly tell us if there is a problem with the 2I2 settings, and if that side is fine, then you leave it alone and focus on the playback stuff or possible disagreements with the virtual cable settings.

And same thing for playback, if you just play music through your DAC with asio, wasapi, Windows mixer or anything you can use from an audio player, is it fine? If you play from audacity is it also fine?
Once both simple input and simple output are set to work fine, bring in virtual cables and voice meter and see how that goes. Match sample rates everywhere even if you're using something that allows on-the-fly resampling, and if you were going for some high sample rate, maybe try 44 or 48 everywhere just to see if that has an impact. Well you got the idea, trying to isolate the element, or more likely the duo that has "communication" problems.

And if you're already clear on all that and I just didn't understand your post, sorry
^_^.
 
Dec 12, 2020 at 5:51 AM Post #3 of 26
Are you referring to latency inside your computer? or do you refer to everything between reading data until sound has travelled and is recorded?

Computer latency is very important for sound quality, folks are using multi core processors, specially selected RAM chips, take care of MB topology etc, and tweak the OS for minimal latency. Linux is good at low latency, so are some heavily tweaked W builds.
 
Last edited:
Dec 12, 2020 at 6:22 AM Post #4 of 26
People often post about issues with pops, crackles and dropouts.
I can be worth checking your PC DPC latency.

DPC Latency Checker v1.2.0 only works until Windows 8, however v1.4.0 works with Windows 10.

There is an interesting link about DPC and microsoft windows 10 - and this shows a screenshot from DPC Latency Checker v1.4.0
https://www.softpedia.com/get/System/System-Info/DPC-Latency-Checker.shtml

There are some posts which now recommend LatencyMon, because this will also indicate which driver is causing the problem.
https://www.resplendence.com/downloads

I tried using DPC Latency Checker v1.4.0, and it quickly revealed that I have no serious DPC issues, but I might also try LatencyMon to check if there are any out of date drivers, that I need to update.
 
Dec 12, 2020 at 8:15 AM Post #5 of 26
In term of audible delay unrelated to artifacts, I can only think of the "direct monitor" button having a noticeable impact on my old version of the 2I2. But from what I get, you don't really
care about reducing latency itself, but instead you'd like to solve your audio artifacts problem that could be caused by latency settings. Am I correct about that?
No, I want to reduce latency as much as possible whilst keeping it stable. I have direct monitor, but that just gives me 0 latency with my microphone, I want my system audio from my computer to be 0 latency.

About all the buffer and resulting sound issues, I have a hard time isolating the cause based on what you said. Have you clearly determined if the problem comes from the recording side or from the playback side? If you forget about the virtual cable for a time and just record ambient sounds in audacity, do you get artifacts on replay? If so is it always at the same time on the playback? And if so, can you see the artifact in the sound wave in audacity?
No, this is a voicemeter issue, focusrite itself works perfectly in terms of stability. I just used voicemeter because there was nothing else that allowed me to reduce the latency.

And same thing for playback, if you just play music through your DAC with asio, wasapi, Windows mixer or anything you can use from an audio player, is it fine? If you play from audacity is it also fine?
Once both simple input and simple output are set to work fine, bring in virtual cables and voice meter and see how that goes. Match sample rates everywhere even if you're using something that allows on-the-fly resampling, and if you were going for some high sample rate, maybe try 44 or 48 everywhere just to see if that has an impact. Well you got the idea, trying to isolate the element, or more likely the duo that has "communication" problems.

And if you're already clear on all that and I just didn't understand your post, sorry
To clarify, all I want is audio from my computer e.g. video games to have 0 latency. I don't really care about recording.

Are you referring to latency inside your computer? or do you refer to everything between reading data until sound has travelled and is recorded?

Computer latency is very important for sound quality, folks are using multi core processors, specially selected RAM chips, take care of MB topology etc, and tweak the OS for minimal latency. Linux is good at low latency, so are some heavily tweaked W builds.
I'm referring to the latency that comes from e.g. a sound generated in a video game for that sound to travel to my headphones.
I know that with linux I'd have a lot more control, and just doing some google searching revealed a lot more tweaks than for windows, however my primary reason for reduced latency is for video games, and those don't tend to run too well on linux, or are at least harder to get to run; may even introduce some overhead.
And yes, I've optimised my windows system as much as I can, I've gone through a bunch of video tutorials and guides on various forums, and have finally reinstalled it and applied all the tweaks that made a difference or were strongly recommended.

There are some posts which now recommend LatencyMon, because this will also indicate which driver is causing the problem.
https://www.resplendence.com/downloads

I tried using DPC Latency Checker v1.4.0, and it quickly revealed that I have no serious DPC issues, but I might also try LatencyMon to check if there are any out of date drivers, that I need to update.
I just tried DPC latency checker, it says my absolute is 561 microseconds as the highest, and current seems to mostly be at around 500-510 microseconds.
The software itself says I should have no problems for real time audio streaming.
 
Dec 12, 2020 at 8:19 AM Post #6 of 26
I'm referring to the latency that comes from e.g. a sound generated in a video game for that sound to travel to my headphones.
I know that with linux I'd have a lot more control, and just doing some google searching revealed a lot more tweaks than for windows, however my primary reason for reduced latency is for video games, and those don't tend to run too well on linux, or are at least harder to get to run; may even introduce some overhead.
And yes, I've optimised my windows system as much as I can, I've gone through a bunch of video tutorials and guides on various forums, and have finally reinstalled it and applied all the tweaks that made a difference or were strongly recommended.
Sounds like something that someone playing osu! that might have thought about once.
I mean... after all there is a guide and experiment from this game from time to time regarding latency, sound included https://osu.ppy.sh/community/forums/topics/794196
 
Dec 12, 2020 at 8:42 AM Post #7 of 26
I just tried DPC latency checker, it says my absolute is 561 microseconds as the highest, and current seems to mostly be at around 500-510 microseconds.
The software itself says I should have no problems for real time audio streaming.
You should be fine.
The head-fier who suggested the software to me, had created his own 'slimmed-down' windows 10 disc, and was averaging green bars and 500 microseconds.
My PC streaming internet radio, was averaging yellow bars and 1050 microseconds, and the software similarly stated no problems expected.
 
Dec 12, 2020 at 8:51 AM Post #8 of 26
So I indeed misunderstood your post and the recording aspect wasn't relevant.
I don't have much knowledge about trying to lower the output latency to the max, that so I'll just go hide now. Good luck :wink:.
 
Dec 12, 2020 at 5:20 PM Post #9 of 26
500, should be OK? WOW, I measured latency on my NUC the other day (Audiolinux) and was confused seeing numbers in the range or 11 knowing really good systems run under 10! Latency matters for sound quality, internal latency I mean, in the computer itself
 
Dec 12, 2020 at 5:23 PM Post #10 of 26
Sounds like something that someone playing osu! that might have thought about once.
I mean... after all there is a guide and experiment from this game from time to time regarding latency, sound included https://osu.ppy.sh/community/forums/topics/794196
I'm looking for a general reduction, for everything, games being the main thing, but not just one particular game, all.
Couple days ago I came across that REAL software he was on about in the post, but it doesn't work for my DAC.
 
Dec 12, 2020 at 5:25 PM Post #11 of 26
500, should be OK? WOW, I measured latency on my NUC the other day (Audiolinux) and was confused seeing numbers in the range or 11 knowing really good systems run under 10! Latency matters for sound quality, internal latency I mean, in the computer itself
Yeah, linux is best for latency these days because it's much easier to tinker with the system itself, and there's more tools/info on how to do it compared to windows.
 
Dec 12, 2020 at 5:49 PM Post #12 of 26
there are plenty folks working on and with Windows for audio, latency can be managed and improved in W too ! I did not read up on it as I do not need the overhead or hassle of cutting out the overhead of windows on my dedicated music computer, but try google...I have seen references to how-to's for windows
 
Dec 13, 2020 at 12:48 AM Post #13 of 26
I'm looking for a general reduction, for everything, games being the main thing, but not just one particular game, all.
I think that finding covers some driver change, which affect basically... anything.
 
Dec 13, 2020 at 5:56 AM Post #14 of 26
500, should be OK? WOW, I measured latency on my NUC the other day (Audiolinux) and was confused seeing numbers in the range or 11 knowing really good systems run under 10! Latency matters for sound quality, internal latency I mean, in the computer itself
You are using a different OS, plus presumably DPC measuring tool.
You also don't tell everyone the units that 11 refers to - is it microseconds, milliseconds, or spinal tap units?
 
Dec 13, 2020 at 8:55 AM Post #15 of 26
I didn't truth is I was not looking closely but i suspect I saw a range between 11 and 17 or so what I assumed to be microseconds knowing it's linux, I left Audiolinux for now as it is far too fussy for my liking and it did not sound as good as my current Daphile (not by far).

I was saying that low latency matters and that out of the box W10 is not great with latency but it can be lowered dramatically.

My W10 laptop I'm now using measures 500 or so microseconds latency with that tool, and I know some folks using W for serious audio report latency well under 10 microseconds (after a lot of tinkering)
 

Users who are viewing this thread

Back
Top