MATLAB Answers


Record multiple microphones simultaneously

Asked by Timothy
on 19 Nov 2012
Latest activity Commented on by joe boby soegiarto on 24 Jun 2015

I have read several topics on this issue, but the ones I have found differed from mine slightly.

I wish to record 2 sound recordings at once. I have both mic's plugged in. I set up two audiorecorder functions like this:





Only rec1 recorded. I can see this by plotting the audiodata for both recordings. Is this problem due to MatLab not recognizing the 2nd microphone? Or is there something inherently wrong with my code?

Also, would there be an easier way to do multiple recordings? I've read something about Data Acquisition Toolbox, but I don't have it and have never used it.

Thanks for your help.


Ah, I misread about input vs output. 1 instead of 0 it is.

Your system has 5 logical audio input devices. The first of them is a USB microphone. The second of them is an stereo jack style on your laptop. I do not have enough information at present to know where the other 3 logical input devices are.

Which microphone inputs do you think you are using? For example if you are using two USB microphones, then you need to find the device ID that corresponds to that USB microphone.

on 28 Nov 2012

I found out why Matlab wasn't recording with one of them, and it was because there was a faulty USB port that it was plugged in to-I tried plugging a mouse into it and that didn't work either. When I plugged it into a different USB, I got this for the audiodevinfo, and it seems to work fine:

>> audiodevinfo(1,1)

ans =

Microphone (1- USB Audio Device) (Windows DirectSound)

>> audiodevinfo(1,2)

ans =

Microphone (2- USB Audio Device) (Windows DirectSound)

Hi i want to ask guys, can you record using 2 differenti soundcard simultaneously?


No products are associated with this question.

0 Answers

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!