Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What causes latency from audio signal in to out in computers

  1. Jul 2, 2014 #1
    I am just a beginner so if I am asking in the wrong forum please move it to the more relevent 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.

  2. jcsd
  3. Jul 2, 2014 #2


    User Avatar
    Gold Member

    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 lets 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.
  4. Jul 2, 2014 #3
    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.

  5. Jul 2, 2014 #4
    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'
  6. Jul 2, 2014 #5


    User Avatar
    Science Advisor

    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.
  7. Jul 2, 2014 #6
    thanks for the response nsaspook,

    that is an interesting paper you've linked, very relevent breakdown of the various parts, thankyou!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook