1
$\begingroup$

I am dealing with a customized processor that has a processing latency of one sample (20.8 microseconds) at 48kHz Sampling rate . What I would like to know is ...does this latency of one sample have any effect on audio application in any way .. If yes I would like to reproduce this and see for a real time scenario.

$\endgroup$
  • 1
    $\begingroup$ It is difficult to answer this without knowing more details about the signal path. But, this figure on its own (20.8 MICRO seconds), does not seem like causing any problems that could make it into the audible range of sounds (whether as a stutter, considerable phase difference or other). Is it possible to provide some more details about the system overall and confirm the latency figure perhaps (?) $\endgroup$ – A_A Oct 22 at 11:09
  • $\begingroup$ Hi there ! Thanks for the insight I would like to clarify my systems overall latency measures 1ms (ADC+DAC) And yes let's assume my signal path would have a lot of Eqs ,filters and DRCs ...But how does a one sample latency affect any audio application if at all ....Can you detail this $\endgroup$ – Clauvunate Oct 22 at 14:01
  • 1
    $\begingroup$ my goodness!!! only one sample latency??!!! how did you accomplish that?! $\endgroup$ – robert bristow-johnson Oct 23 at 0:44
1
$\begingroup$

Low latency is often required in applications where the DSP is part of a feedback loop. Excessive delay in a feedback loop can limit the maximum feedback gain that can be achieved without oscillation. A classic example is closed-loop acoustic noise cancellation.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Dear Bob, I understand what you said is right . however can you explain in detail about how a one sample processing latency would affect an ANC that is digitally implemented ... if you understand I would like to know the smallest details possible about how my DSP that has a one sample latency would affect any audio event such as an ANC with feedback as suggested in one of the replies . $\endgroup$ – Clauvunate Oct 22 at 18:42
  • $\begingroup$ Picture a wide-band impulse reaching your microphone. You want to suppress that impulse at a loudspeaker nearby by playing back an impulse of the opposite polarity. Now introduce processing delay and se how those two pulses add up next to the loudspeaker. $\endgroup$ – Knut Inge Oct 22 at 19:25
  • $\begingroup$ Dear Knut , Thanks for your response ... I would want to perform a test as you mentioned ... could you elaborate on this .... Firstly Can I use any standard signal ,I do not know how to generate a wide band impulse in my tool. Secondly say I use a two sine waves and I invert the polarity of one and add them will that demonstrate how one sample latency impacts the audio ???? Can you help me draw a picture to simulate this $\endgroup$ – Clauvunate Oct 22 at 20:31
1
$\begingroup$

One sample latency is pretty much unavoidable so this is fairly normal. Please note that you need to look at the total system level latency which includes DA and AD conversion. Many audio applications use Sigma Delta converters which have much higher latency than one sample, so your processing latency wouldn't make much of a difference.

The impact of latency depends very much on the specific application. One sample is very low and the only applications that would be impacted by this is anything with a feedback loop (active noise cancellation, active excursion control) and any application that has a parallel analog path (effects loop in an analog mixer for example)

It's not a problem for UI responsiveness, audio/video sync, play/sing/talk along, multi-speaker synchronization, etc.

The most latency-sensitive audio application is active noise cancellation and many dedicated ANC processors run at a significantly higher sample rate, just to reduce latency and increase bandwidth of the feedback loop.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you for your response Hilmar .. Could you detail how one sample processing latency would affect a digitally implemented ANC . $\endgroup$ – Clauvunate Oct 22 at 14:03
1
$\begingroup$

Latency is inevitable in signal processing—you receive a sample, and some time is taken to perform computations and return a modified value. Because it's usually important to be predictable and synchronous, a full sample delay is usually the minimum. But note that when using the processor of a general purpose computer, which is running an operating system and handling other tasks, we typically have a much larger latency. This is because the signal processing code is given a buffer full (perhaps 256 samples or more, usually no less than 64) of samples to act on. That's because there is some overhead in calling the processing routines, and that is mitigated by processing multiple samples in a single call.

So, a one-sample delay is the minimum practical latency for a generalized audio system, and typically requires dedicated processing hardware (perhaps a DSP chip).

In a pure playback system, latency matters little. Press the play button for a song on your smartphone. How long did it take to start playing? As long as it's not an extraordinary amount of time, you probably have no idea. It doesn't relaly matter if the music starts after a 1 ms pause or 30 ms.

However, all streams of audio must maintain their relative positions in time. For stereo, you cannot have the left channel with a 1 ms delay, and the right with 30 ms. If processing produces that, you'd need to compensate by delaying the left channel by 29 ms to get the channels back in the original relative alignment.

Multitrack recording applications typically allow many channels of processing. You may have a vocal track and three background vocal tracks, a stereo drum track, guitar and bass tracks. Each may have different effects processing, some of which might require additional latency (maybe a volume-leveling process that needs to look over the past 200 ms in order to make its gain decisions). These applications typically have a "latency compensation" feature—each process reports its latency, and the application delays each channel by the number of samples necessary to align them with the channel of greatest latency.

So, for audio, you typically want minimum latency—especially for the case where someone is recording into a computer, but needs to listen to the signal from the computer, perhaps because they are listening back with effect processing; it's difficult to play in time while listening to the result if the latency is too great. Then there is a tradeoff between buffer size, as bigger buffers have better processing efficiency, but worse latency. But the one factor you typically can't trade off is that any parallel channels, or tracks, must be synchronized with each other if they are correlated at all (they usually are).

| improve this answer | |
$\endgroup$
0
$\begingroup$

Assuming that this is an analog audio in/analog audio out application, in addition to the other great responses, you would see comb filtering if the input were summed with the output. All things being equal, which at such low latency seems impractical, a signal delayed by 20us would not be perceptible. However, the sum of the input and output, even if the process were totally dry, would create a filter with a zero at half the sample rate. At 48kHz, this would cause some high end attenuation in the audio band.

Edit: with a 1ms total latency, a 0.02ms latency won’t have a noticeable effect, that I can think of. That’s only 2% of the overall latency. It’s big enough that you could maybe measure it with a scope, but not enough to have a perceivable impact for any in line audio process such as filtering or DRC.

| improve this answer | |
$\endgroup$
0
$\begingroup$

50 uS is about the time it takes sound to travel 6mm. So if your application is doing TDOA or stereo source positioning, you will introduce 6mm additional error or calibration requirements. If it’s sound from a fixed speaker to a listener (or singer to a mic), then it won’t make much difference unless you clamp the persons head position to less than 6mm of movement.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.