4 ms·
Games tend to target 60fps based on current displays, generally based on the vertical sync rate. (some monitors are 144Hz, for example) 60fps is roughly 16ms,
by shermanyo 10y ago
Games tend to target 60fps based on current displays, generally based on the vertical sync rate. (some monitors are 144Hz, for example)
60fps is roughly 16ms, for reference.
Audio is different, it's often about round trip latency (eg. from the time the sound is made, to when it is heard back) and has a few additional issues to consider.
Eg. there can be phasing issues where one signal cancels out or amplifies another.
This is controlled by varying the buffer sizes, but issues can still arise due to processing latency.
If the output buffer falls behind you'll hear pops as the speakers cut out.
A lot of DSP code is written to be lock-free by allocating vars when initializing so no memory allocations actually occur during updates. There are a couple great youtube talks on the subject. (look at the JUCE and CppCon channels)