Revision [21053]
This is an old revision of AudioLatencyMeasurement made by ToBo on 2015-03-16 04:39:14.
Latency Measurement of your Audio Interface
How to measure the latency of your audio interface?
If found my way to measure what I wanted to measure.
I wanted to measure the delay my DAW needs to get a external signal and output it again. Actually it is possible to do it with one computer, but I wanted to separate the measuring system (my laptop) and the measured system (DAW).
The idea is to generate a white noise signal with a duration of 100 ms, repeated every 1 second and to send this signal from another computer to the DAW. I also connected the return signal from my DAW to the first channel of my laptop (measuring computer). Beside this, to eliminate the unknown latency of the measuring computer, I connect the other second output channel of the computer to the second input channel of the computer.

First of all you need the test file I generated using Octave. You can download the test file or generate it by yourself using the script.
- Download: ...
- Script: OctaveGeneratingATestFile
You need this analysis script, if yo want Octave to measure your latency.
% Andraes Tobola, March 2015
% Analyse a test file for audio latency
clc
clear
fs = 44100; % Sampling rate
fn = 'latency_meas1.wav'; % Filenemae
x = auload(fn);
y = abs(x);
yi = y(:,1);
yo = y(:,2);
N = length(yi);
tl = linspace(0, N/fs, N);
th= .05; % Threshold
idx_i = find(yi>th,1);
idx_o = find(yo>th,1);
ti = idx_i / fs;
to = idx_o / fs;
hold off
plot(tl,y);
hold on
m = max(max(y));
plot([ti ti],[0 m],'r')
plot([to to],[0 m],'r')
xlabel('Time (s)')
ylabel('Rectified audio samples')
grid on
legend('Input','Output')
L = (to - ti); % Latency in seconds
disp (['Latency: ' num2str(round(L*100000)/100) ' ms' ])Final latency: 8.62 ms
Siehe auch •