openFrameworks has an opportunity to capture live sound from a sound card's input, such as a microphone or a line input.
The code in this section will work properly only if your computer has a sound input. Most probably, your laptop already has a built-in microphone. If your computer has no sound input, you can use an external sound card connected via USB or any other type of connection.
To enable sound capture and measure its level, perform the following steps:
void audioIn(float *input, int bufferSize, int nChannels); float soundLevel;
The first line declares the
audioIn() function, which will be called by ...