Can someone please explain how this function? It is for simultaneously recording with the input(X) being white noise at FS 44100hz
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
function recording = audioOI(x,fs)
% audioOI - Simulataneously plays and records the test signal.
% Uses Parallel Computing Toolbox.
% INPUT: x - test signal
% fs - sampling frequency
% OUTPUT: y - recorded signal
time = length(x)/fs; % play/record time
recObj = audiorecorder(44100,16,2);
parfor ii = 1:2
if ii==1
recordblocking(recObj, time);
recording{ii} = getaudiodata(recObj);
elseif ii==2
soundsc(x, fs);
end
end
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Audio and Video Data dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!