Recording using more than two microphones simultaneously

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

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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

질문:

2013년 7월 20일

댓글:

2013년 10월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by