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!
 
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...
Back
Top