code for simultaneous sound recording and playing
1 view (last 30 days)
I have been using MATLAB for processing sound file. i used these two codes for reading sound file from mic. But in both codes i can only process or rather plot the sound file only after it completes recording.
rec1 = audiorecorder;
and the second one is
AI = analoginput('winsound');
>> addchannel(AI, 1);
>> set (AI, 'SampleRate', fs)
>> set(AI, 'SamplesPerTrigger', t*fs);
>> data = getdata(AI);
but i need to plot the sound file while it is getting recorded. so someone please give me the modified code or some suggestion for that.