Recording output of stereo cable for latency measurement

2 次查看(过去 30 天)
Hi there,
I have a normal stereo aux cable plugged into the audio input jack. The stereo cable comes from another sound stimulator that produces sounds and sends triggers. The stereo cable contains information of the audiosignal in one channel, and information of triggers in the other channel.
Now I need to measure the latency and jitter of the audiosignal and trigger pulses and ideally I would want to visualise the audiosignal and trigger pulse in a top and bottom graph.
Is there a way to measure and visualise the signals of a stereocable input in Matlab?
  9 个评论

请先登录,再进行评论。

回答(1 个)

Anton M
Anton M 2022-5-10
Thank you both, the following worked for me very well!
Fs = 44100 ;
nBits = 16 ;
nChannels = 2 ;
ID = -1; % default audio input device
recObj = audiorecorder(Fs,nBits,nChannels,ID);
recordblocking(recObj,300);
MyRec = getaudiodata(recObj);
FirstCh = MyRec(:,1);
SecondCh = MyRec(:,2);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by