Audio capturing in C#

595 views Asked by At

I have a MAYA 44 USB sound card and would like to interface it with C#. I want to record from the provided microphones and produce a data array. I have found examples when using the internal sound card from my laptop but when it comes to external it does not quite work. Has anyone every connected the above sound card with C# please?

2

There are 2 answers

0
James Love On

Have you had a look at the DirectSound API (Windows only though, I think). Might provide what you're after.

0
CodesInChaos On

On how to record audio with C# in general there are already multiple threads on SO, so I won't talk about that.

I see two possible causes for your program which have different solutions:

  1. You need to change which audio sources are muted in the windows volume control ("sndvol32.exe /R")
  2. When opening the audio device there are multiple devices. And you're simply opening device 0 instead of enumerating them and perhaps choosing another one. The external sound-card might appear as a second device.