I need to know the delay between programmatically running the sound and actually having it played from the speakers, which are connected to the computer through the AUX 3.5mm cable.

How can I learn what those delays are?

I am running Windows 7 version 6.1 build 6701, and my speakers are Dell AX210.

I need to know the delays because I am planning to run a psychological experiment which involves sound. Knowing the difference between the program's logs timestamps and actual membrane activation is important for data analysis.

  • There are multiple factors that would influence this. Only measurement on your system would provide meaningful results. I expect such delays would be short and difficult to measure. – LMiller7 Mar 17 '18 at 17:04
  • 2
    This question may seem iffy as far as being on-topic for the site because it describes the intended use, and human factors questions tend to be considered off-topic if they focus on the human. But measuring system delays is on-topic, regardless of the purpose. So close voters, please don't get hung up on why the OP wants to do it or how the results will be used. – fixer1234 Mar 17 '18 at 22:37
  • @LMiller7 "only measurement on your system" - that's my question: how do I perform the measurement? – styrofoam fly Mar 17 '18 at 22:58

The time from the sound output being produced until it emerges from the speakers as sound is infinitesimal, so irrelevant. But it can take time for the system to actually produce the sound, especially if it is otherwise busy. That can be in a range that would be significant relative to human reaction time. An even bigger problem is that the time can be very variable, depending on what the system is doing at the time.

I'm not savvy enough to know whether it's possible to capture the presence of sound signal output as a loggable system event. If you need an application to do that, you haven't accomplished anything because that application will introduce the same problem you're trying to solve. So my suggestions involve using a microphone to detect the sound output.

  • Minimal solution: measure the delay, as asked in the question. Use a dedicated system that does nothing but produce the sound on demand. Test it multiple times to measure the delay time between triggering the program and measuring sound output at the speakers with a microphone at the front of the speaker. This would have to be done electronically, not with a process that includes human reaction time.

    If the time is very precise, decide if it is good enough to trust and adjust your results for that "standard delay time". If the delay is less than a few tens of milliseconds, it is probably short enough to be ignored for your purpose.

  • If you just need something crude, the minimal solution above might be "good enough". But there are still variables. For example, if the person is leaning forward and back, that difference in distance can be enough to add time noise (only a millisecond or two, but every source of noise adds to the imprecision). There is also no guarantee that the system will have precisely the same delay in use.

    A very precise method would be to bypass the need to measure the system delay and instead, start with the time at which the sound arrives at the person's head. Have the person wear a head-mounted or lapel microphone. Measure time from when the microphone detects the sound rather than from when the program is triggered. Note that you don't want to do this with a noise-cancelling microphone, or one that includes any circuitry that waits for sound to turn things on.

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.