there is no simple answer; best practices depend on the context and specific use cases to which your application will apply.
for maximum ease of programming and the widest audience, I would choose gstreamer because it is fast and simple, well integrated into gnome and ubuntu and supports a wide range of audio subsystems and configurations. he is very flexible.
for example, the command:
gst-launch autoaudiosrc ! audioconvert ! flacenc ! filesink location="foo.flac"
will create a .flac file from the microphone input, regardless of the audio system (Pulse, ALSA, ESD ...). an equivalent pipeline can be written using c / gobject bindings, as described here .
ps the above command requires the gstreamer-tools package
Jeremiah rose
source share