Recording using more than two microphones simultaneously
3 views (last 30 days)
Show older comments
What I want to do is sound source localization, by recording the sound source using a number of microphones and finding out the time delay of each data. Doing this, synchronization of recording is very important. I tried to record simultaneously using the code below:
recObj1 = audiorecorder(44100, 16, 1,1);
recObj2 = audiorecorder(44100, 16, 1,2);
record(recObj1,5)
record(recObj2,5)
i=0;
while i<350000
i=i+1
end
The reason I wrote the while construction is because when I don't give that spare time, the system returns error.(I don't know why) But still the result is not what it actually should be. I mean the recording is not simultaneously going. Random time delay occurs.
I am using two USB sound card to get two input microphones. Is this fact causing the problem? Or, I wonder if matlab is naturally not suitable for simultaneeous recording using more than two microphones.
Anybody knows how to record using two microphones simultaneously?
1 Comment
DavidOviedo
on 11 Oct 2013
I have the same problem. You can see here http://www.mathworks.com/matlabcentral/answers/89057-delay-between-two-audiorecorder-orders
I'm ussing the same device with every microphone. It's a MOTU with 8 channels.
My code uses a pause instead of while. I have not problems with it.
In my experience, start orders are almost simultaneos. Instead, stop order are markedly delayed.
I can not be of more help, but I hoope someone knows answer.
Answers (0)
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!