I am capturing Audio...

Hi.
Im working about capturing audio from Mic.
it works when i use only one sound device.
However, I have 2 sound devices, so i wanna record all of sounds from both sound devices.
And I am using WaveIn class.
This is a question.
1. How can i capture audeo from two microphones on deferent sound device?
2. If number 1 is possible, how can I save two files(*.wav) into one file?

If anyone needs source code, let me know that.

Thanks.
You would need to grab the LineID for each device and since you want to capture both devices at the same time you would need a thread for each task. So basically take what you have now, make sure it's a function and it does NOT use any global variables for storage and pass that function to "CreateThread(...)" for each LineIN device you want to capture sound from. It will be more complicated then that, but since I have no direct experiance with audio capture like this all I can offer is an outline of what to do next. However, if you have any questions about Multithreading then myself and at least two others that I can think of off the top of my head over on the Windows section are very experianced on the topic.

P.S.: My first Google search led me to the Win32 API, this is what you are using right?
Last edited on
Thanks Computergeek01. And Yes, You're right. I am using Win32 API.
I will test it with what you posted.
However, I think that there might be a problem.
If I create two thread, will there be two wav files?
I mean, each thread might have one file, I think.
Anyways, I will re-try it. Also, I will question it on the Windows section as wel..
Any other ideas, reply to me. :)
Thanks.
Topic archived. No new replies allowed.