Difference between revisions of "Audio delay"

From TSG Doc
Jump to navigation Jump to search
Line 4: Line 4:
 
== Neurobs presentation ==
 
== Neurobs presentation ==
 
These are measurements of the audio delay in Neurobs Presentation on the Faculty of Social Sciences (DCC and BSI) labcomputer  
 
These are measurements of the audio delay in Neurobs Presentation on the Faculty of Social Sciences (DCC and BSI) labcomputer  
with three different settings. Note that exclusive mode is most used in experiments and is the mode best comparable with for  
+
with three different settings ([https://gitlab.socsci.ru.nl/tsg/performance-tests/tree/master/Presentation/audio/SoundLatencyTest download the script here]). Note that exclusive mode is most used in experiments and is the mode best comparable with for  
 
instance Linux Alsa. Shared mode is best comparable with Linux Jack.
 
instance Linux Alsa. Shared mode is best comparable with Linux Jack.
 +
  
 
In exclusive mode the histogram is square. The minimum delay is 15 ms, the maximum delay is 24 ms. This is caused by a single 10 ms buffer.
 
In exclusive mode the histogram is square. The minimum delay is 15 ms, the maximum delay is 24 ms. This is caused by a single 10 ms buffer.

Revision as of 11:28, 17 December 2018

Audio delay is the time between the moment the experimenter want the audio to be played and the start of the audio playing. For experiments where no distinction is made between systematic and random errors in timing, the audio delay equals the accuracy of the onset of the audio stimulus.

Neurobs presentation

These are measurements of the audio delay in Neurobs Presentation on the Faculty of Social Sciences (DCC and BSI) labcomputer with three different settings (download the script here). Note that exclusive mode is most used in experiments and is the mode best comparable with for instance Linux Alsa. Shared mode is best comparable with Linux Jack.


In exclusive mode the histogram is square. The minimum delay is 15 ms, the maximum delay is 24 ms. This is caused by a single 10 ms buffer.

The maximum error is therefore 24 ms. When a distinction is made between accuracy and precision, the maximum accuracy error is 14 ms, the maximum precision error is 10 ms.

Note that for most experiments this is more than good enough.

Since the audio call in Presentation is semi-synchronous (it waits till the sound starts playing) it is possible to know the audio onset with much higher precision by noting the time that the call ends. This way a precision of better than 3 ms is possible.

Presentation, Exclusive Mode

Exclusive mode delay

Presentation, Shared Mode

Shared mode delay

Presentation, DirectX Mode

DirectX mode delay

Alternative definitions

Round trip test

This is the definition used above.

  1. the audio stimulus is prepared
  2. a random delay is applied
  3. the virtual stopwatch is started
  4. the audio stimulus is started immediately after the stopwatch
  5. the line output of the audio hardware is connected to the sound or voice detector of the buttonbox
  6. the buttonbox reports receiving the audio, the virtual stopwatch is stopped

This loop is repeated a number of times to get a good estimate of the statistical distribution of the delay.

Oscilloscope test

This test more accurately measures the delay, since no loop back to the computer is needed. The test is more work to perform and therefore less useful for determining the statistical distribution of the delay.

  1. the audio stimulus is prepared
  2. a random delay is applied
  3. a trigger is sent to the buttonbox, the trigger show on one channel of the oscilloscope
  4. the audio stimulus is started
  5. the line output of the audio hardware is connected to another channel of the oscilloscope
  6. the time difference between the onsets on the trigger and the audio signal is measured on the oscilloscope

This is an example of audio delay of 2 ms measured with the oscilloscope test.

Example audio delay of about 2ms using the osciloscope test.

Precision test

This test does not measure the audio delay itself, but only the precision. It can be combined with the previous tests. The difference is that step 3 and 4 are exchanged. This effectively deducts the time that sending the audio stimulus takes is deducted from the audio delay. If the audio is made with a synchronous function then this test is similar to how visual delay is measured.