Question

I am working on a project that I need to do some processing with the audio signals obtained from a USB microphone. It would be best to read the original sample readings from the USB port. However, I couldn't find anything very relevant. I am planning to use C/C++ to implement this program. Can anyone help me to start?

I saw a library named libusb but I am not entirely sure how to use this as a way to fetch the sound signals from the USB mic. Also, when I say "fetch", I mean I need to see the originally sampled data.

Was it helpful?

Solution

The Blue Snowflake Microphone will enumerate as a USB Audio device on both Windows and Linux, which means you don't need a driver and you shouldn't have to talk to it as a generic USB device. Instead you will want to interface with the device using the native audio APIs. This means you can open the device, setup your audio format settings and start capturing samples directly from the device.

On Windows have a look at the Core Audio APIs, once you have your devices opened you should be able to create an audio session to grab samples from the device using WASAPI.

For Linux you should have a look at ALSA, and while I haven't used it PulseAudio seems to be a popular audio API for modern Linux distributions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top