• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

PaperBoat

Active Member
Joined
Jun 19, 2022
Messages
219
Likes
36
Please help me to understand Buffer and Sample size functions in ASIO devices.

-------------------------------------------------------------------------------------------First scenario-------------------------------------------------------------------------------------

My Foobar2K buffer is set to 50ms. ↓
IMG_20230628_152911.jpg






My IFI USB audio device buffer size is set to 8 samples. ↓
Screenshot 2023-06-28 151416.png




In this scenario, Foobar is able to play music without any glitches.







-------------------------------------------------------------------------------------------Second scenario---------------------------------------------------------------------------------




My JRiver buffer is set to "Minimum Hardware Size". ↓
IMG_20230628_152745.jpg






My IFI USB audio device buffer size is set to 8 samples. ↓
Screenshot 2023-06-28 151416.png




In this scenario, JRiver is failed to play music.











----------------------------------------------------------------------------------------------------Third scenario--------------------------------------------------------------------------



My JRiver buffer is set to "Minimum Hardware Size". ↓
IMG_20230628_152745.jpg










My IFI USB audio device buffer size is set to 128 samples. ↓
Screenshot 2023-06-28 151558.png






In this scenario, JRiver is able to play music without any glitches.

Note: JRiver is unable to play music if IFI USB audio device buffer size is set to below 128 samples.
IMG_20230628_152258.jpg






What is going on?
 

DVDdoug

Major Contributor
Joined
May 27, 2021
Messages
3,036
Likes
4,004
A buffer is like a storage tank or a long pipe. Buffers are required because of the multitasking operating system, and your OS is always multitasking even when you're running only one application. A buffer is also a delay.

Data is written to the output/playback buffer in a quick burst and then it flows-out to the DAC at a smooth-constant rate. If the buffer isn't re-filled in time you get buffer underflow and a glitch/gap in the audio. This happens if the buffer is too small or if something hogs the system for a few-milliseconds too long. Whatever is interrupting the audio doesn't have to be using a lot of total CPU time, it just has to hog it for a few extra milliseconds.

There is also an input/recording buffer that works the opposite way. The audio data flows-in smoothly and is written to the hard disk in a quick burst when the system gets around to it. If the buffer is not read in time, or if the buffer is too small, you get buffer overflow and a glitch.

With a bigger buffer you get more latency (delay) and less chance of a glitch.

Latency is mostly an issue while recording and monitoring yourself on headphones. It's hard to perform with a noticeable delay in your headphones.
Or it can be a problem if you are watching a video and the audio & video latencies don't match and you get a "lip sync" problem. For everyday listening, a few (or several) milliseconds of latency is not a problem. I've got recordings with 60 years (or more) of "latency". ;)

172 samples at 44,100 samples-per-second is 0.0039 seconds = 3.9 milliseconds.
 

AnalogSteph

Major Contributor
Joined
Nov 6, 2018
Messages
3,397
Likes
3,347
Location
.de
Foobar2k internal "Buffer Length" has nothing to do with the ASIO driver buffer, which is the setting that JRiver seems to respect. You should be able to open the ASIO driver settings dialog from within Foobar, probably under "More options". Its settings are generally maintained per application.

BTW, ASIO is not generally worth messing with in a playback application these days. WASAPI exclusive mode tends to be just about equivalent.
 
OP
PaperBoat

PaperBoat

Active Member
Joined
Jun 19, 2022
Messages
219
Likes
36
Foobar2k internal "Buffer Length" has nothing to do with the ASIO driver buffer, which is the setting that JRiver seems to respect.
Is there any benefit when using EQ DSP in players with lower software buffer? Like JRiver is offering lower buffer setting than Foobar2000... I'm asking because I think changes in EQ DSP will more effective with lower buffer samples... Isn't it?
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,411
Likes
18,383
Location
Netherlands
I'm asking because I think changes in EQ DSP will more effective with lower buffer samples... Isn't it?
What do you mean by “more effective”?

EQ works exactly the same, regardless of any buffer size. There may be some advantages with regards to CPU usage with various buffer settings, but the outcome, except for delay is the same.
 

HarmonicTHD

Major Contributor
Joined
Mar 18, 2022
Messages
3,326
Likes
4,837
For just play back, latency is not relevant. Set the buffer as large as you can. (Latency becomes important when recording eg playing an instrument while listening to yourself playing while you either record the instrument or run it through effects eg DAW).
 
OP
PaperBoat

PaperBoat

Active Member
Joined
Jun 19, 2022
Messages
219
Likes
36
What do you mean by “more effective”?

EQ works exactly the same, regardless of any buffer size. There may be some advantages with regards to CPU usage with various buffer settings, but the outcome, except for delay is the same.
Maybe my wrong choice of words. But I think when working with bigger samples DAC don't need to request information for a while... In the meantime changes that made by EQ DSP will have to waiting for next big samples transmission.
 
Last edited:
OP
PaperBoat

PaperBoat

Active Member
Joined
Jun 19, 2022
Messages
219
Likes
36
For just play back, latency is not relevant. Set the buffer as large as you can. (Latency becomes important when recording eg playing an instrument while listening to yourself playing while you either record the instrument or run it through effects eg DAW).




The audiophile world is full of confusing things!
IMG_20230315_181158.jpg
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,411
Likes
18,383
Location
Netherlands
Maybe my wrong choice of words. But I think when working with bigger samples DAC don't need to request information for a while... In the meantime changes that made by EQ DSP will have to waiting for next big samples transmission.
That’s not how it works. These buffer sizes are largely independent from how the DAC requests data over the USB bus.
 
OP
PaperBoat

PaperBoat

Active Member
Joined
Jun 19, 2022
Messages
219
Likes
36
That’s not how it works. These buffer sizes are largely independent from how the DAC requests data over the USB bus.



Okay... But I would like to know what is "DAC Link"? Is it a Voodoo thing?
IMG_20230315_181158.jpg
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,411
Likes
18,383
Location
Netherlands
It’s just something to control latency. Unless you do live audio mixing, I would not care about the setting. It has no influence on sound quality, other than that maybe some settings won’t give stable playback m.
 
OP
PaperBoat

PaperBoat

Active Member
Joined
Jun 19, 2022
Messages
219
Likes
36
"Some people prefer high values and others prefer low."

That's drives me crazy... :facepalm:
 

jhwalker

Active Member
Joined
Sep 3, 2018
Messages
169
Likes
341
Location
Dallas, Texas
"Some people prefer high values and others prefer low."

That's drives me crazy... :facepalm:
... because they don't know any better.

As other posters have noted, buffer size / latency is totally irrelevant to sound playback "quality", other than larger buffers perhaps making it less "glitchy" in busy system.

It may only become noticeable if you are doing real-time recording / monitoring.
 

dfuller

Major Contributor
Joined
Apr 26, 2020
Messages
3,414
Likes
5,260
Buffer size only has to do with latency vs stability. Most people who need to worry about that are recording, with monitoring from the DAW so as low a RTL as possible is desired.

For just listening, it makes absolutely no difference.
 
Top Bottom