What causes latency from audio signal in to out in computers

AI Thread Summary
Latency in audio processing is primarily caused by buffering, where multiple input samples are collected before processing, leading to a delay based on the size of input and output buffers multiplied by the sampling rate. The actual travel time of audio signals through wires is negligible compared to the delays introduced by digital signal processing (DSP) components and the need for analog-to-digital and digital-to-analog conversions. Digital systems inherently have higher latency due to the processing of blocks or samples, which requires time for computations and transitions between tasks. Specialized hardware can achieve lower latency by using dedicated DSP chips, unlike general-purpose computers that must manage multiple tasks. Understanding these factors is crucial for optimizing audio performance in digital systems.
mooseboi
Messages
6
Reaction score
0
I am just a beginner so if I am asking in the wrong forum please move it to the more relevant one.

From my understanding, electromagnetic waves are what carry audio signals and dependent on the conductor, this speed varies. I have read coxial will carry at about 2/3 speed of light, and fibreoptic at about 96% speed of light.

So my question is, what are the main causes of the delay of an audio signal going into the computer and coming out?

My hypotheses, which i am hoping will be proven to be wrong:
components that cause the most delay
-the actual time it takes electromagnetic waves to travel along the physical distance of the wiring from audio input to output
-the limitation of a computer processor only being about to process, in my case, 2.5GHZ x 64 bit blocks per second

I feel I'm asking a much bigger question that what I know about the science behind it, but I thought there's no harm asking.

Cheers
 
Engineering news on Phys.org
Buffering is the main cause of delay. A number of input samples are accumulated in a buffer before the software is notified about the buffer being ready for processing. It then does whatever processing you want it to do and sends another buffer to the audio interface which will output it 1 sample at a time.

So basically the minimum latency is the size of (input buffer + size of output buffer) * period of sampling rate

On a typical computer rather large buffers are needed since the computer will take time to transition from whatever it's doing to processing a new audio buffer. On PC, sound cards for use in music production typically come with an ASIO driver that let's the user choose the size of the buffers. The lower the size of the buffer the lower the latency, but that comes at a price. The computer must process those buffers more frequently and if it fails to do so in time, you will hear some really bad audio artifacts.

On specialized hardware you can get away with much lower latency by using chips designed for signal processing
(DSP) and not having to worry about all the other things a general purpose computer must do.

Actual travel time of the signal in the wires is negligible for audio processing.
 
hi codexus, thanks for the reply.

Yes, i understand the buffering which affects and causes the delay of audio processing. I suppose I'm asking the question on a lower level.That is, what electrical components in digital systems which use buffering are not present in an analogue system like a all valve guitar amp which doesn't need to buffer the signal, and why is it that these components introduce delay while analogue circuits don't?

Again, i have to reiterate that I might be asking a question that is beyond what I can comprehend as someone who doesn't have electrical engineering knowledge.

Cheers
 
here is an excerpt from http://en.wikipedia.org/wiki/Digital_filter#Comparison_of_analog_and_digital_filters.

"However, digital filters do introduce a higher fundamental latency to the system. In an analog filter, latency is often negligible; strictly speaking it is the time for an electrical signal to propagate through the filter circuit. In digital systems, latency is introduced by delay elements in the digital signal path, and by analog-to-digital and digital-to-analog converters that enable the system to process analog signals."

This is relevant to what I am trying to find out. But I am finding it very hard to find anything on the internet relating to 'delay elements in the digital signal path'
 
Digital signal processing operates on blocks or samples of the analog signal inputs for a period of time so there is always some sampling time delay. It then executes DSP 'math' on the digital blocks that must be completed in time for the next sample or buffered in memory for later processing. The 'latency' is from a number of factors in that sampling/processing chain.

The Linux audio latency is an example of mainly OS software/hardware portion of those delays.
https://www.osadl.org/fileadmin/dam/rtlws/12/Rodriguez.pdf
 
thanks for the response nsaspook,

that is an interesting paper you've linked, very relevant breakdown of the various parts, thankyou!
 
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top