I need to open the default audio capture device and start recording. libsox
seems to be a nice cross-platform solution. Using the binary frontend, I can just rec test.wav
and the default microphone is activated.
However, when browsing the documentation, no similar functionality exists. This thread discusses precisely the same topic as my question, but doesn't seem to have reached a solution.
Where could an example of using libsox
for recording from the default audio device be located?
You can record using libsox. Just set the input file to "default" and set the filetype to the audio driver (e.g. coreaudio on mac, alsa or oss on linux)
Look at some examples for more info on how to structure the rest of the code.