문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top