Linux library, C ++ for audio capture (microphone only)

I am developing a music game, it's like a singstar, but instead of singing you need to play a recorder . It was called oFlute , and it is still in its early stages of development.

In the game, I grab the microphone input, then run a simple FFT analysis and compare the results with the typical frequencies of the recorder, thus obtaining a recorded note.

The audio editor used at first was RtAudio , but I don’t remember why I switched to PortAudio , which I still use. Problem It consists in the fact that from time to time it accidentally falls or stops, for example, if no sound comes from the microphone.

My question is the best way to capture mic input on Linux? I just need to open, read and close the byte stream from the microphone.

I read this manual , and (un) surprisingly says:

I do not think PortAudio is a very good API for Unix-like operating systems.

So what do you recommend to me?

+3
source share
1 answer

PortAudio is a strange choice, considering other options.

GStreamer. Linux ( ). Gstreamer , , .

OpenAL, , , ( "" PulseAudio).

, ( PulseAudio, ), , , , , .

PulseAudio - , , barebone ALSA, , , . , ( ).

+6

Source: https://habr.com/ru/post/1749856/


All Articles