Audio delay: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
For experiments where no distinction is made between systematic and random errors in timing, the audio delay equals the accuracy | 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. | of the onset of the audio stimulus. | ||
== | == Ways of measuring / definitions == | ||
=== Round trip test === | === Round trip test === | ||
This is the definition | This is the definition that we use most often, because it is relatively simple to measure. All you need is a computer with an analog audio output | ||
and a usb-port. The analog output can also be a different device that is controlled by the computer, for instance the Behringer. | |||
# the audio stimulus is prepared | # the audio stimulus is prepared | ||
# a random delay is applied | # a random delay is applied | ||
| Line 36: | Line 19: | ||
# the audio stimulus is prepared | # the audio stimulus is prepared | ||
# a random delay is applied | # a random delay is applied | ||
# a trigger is sent to the buttonbox, the trigger | # a trigger is sent to the buttonbox, the trigger shows on one channel of the oscilloscope | ||
# the audio stimulus is started | # the audio stimulus is started | ||
# the line output of the audio hardware is connected to another channel of the oscilloscope | # the line output of the audio hardware is connected to another channel of the oscilloscope | ||
# the time difference between the onsets on the trigger and the audio signal is measured on the oscilloscope | # the time difference between the onsets on the trigger and the audio signal is measured on the oscilloscope | ||
=== Precision test === | === Precision test === | ||
| Line 50: | Line 29: | ||
takes is deducted from the audio delay. If the audio is made with a synchronous function then this test is similar to | 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. | how visual delay is measured. | ||
= Examples = | |||
== 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 ([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. | |||
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. | |||
=== Presentation, Exclusive Mode === | |||
[[File:Exclusive mode.png|border|Exclusive mode delay]] | |||
=== Presentation, Shared Mode === | |||
[[File:Shared.png|border|Shared mode delay]] | |||
=== Presentation, DirectX Mode === | |||
[[File:Directx.png|border|DirectX mode delay]] | |||
== Neurobs presentation, precision test == | |||
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. If one does not need to ''control'' | |||
the moment the audio starts but only needs to ''know'' the moment, this is the value that should be called the onset ''precision''. | |||
== Linux, Alsa, oscilloscope test == | |||
This is an example of an audio delay of 2 ms measured with the oscilloscope test. | |||
[[File:Alsa.png|border|Example audio delay of about 2ms using the osciloscope test.]] | |||
This particular test was done on the labcomputer with a python script using ALSA, which is comparable with true exclusive mode, as it existed in MS Windows Xp, where the operating | |||
system allows only one program to control the audio hardware. | |||