<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Related with this topic, I would like to contribute with 3 pieces of code made with an educational point of view (though I don't teach audio processing and I don't consider an expert myself). These examples use libsndfile library, that is important if the source or the destination of your audio data is a wav file.<br><br>a) jcapture:<br>*http://wiki.joanillo.org/images/0/07/Jcapture-1.0.0.tar.gz <br>reads the data coming from the microphone, and saves a wav file. Shows a textual signal meter in the console. (I know the existance of jack-capture. I didn't look at jack-capture code, sure that has better performance and lots of options, I just wanted the minimal code)<br><br>b) jplay-sndfile-simple:<br>*http://wiki.joanillo.org/images/1/1e/Jplay-sndfile-simple-1.0.0.tar.gz<br>It's just a playback wav file. In the callback function there are two possibilities:
 copying blocks of memory; or copying sample by sample, and this permits a little signal processing (in this simple case just divide the signal by 2).<br>I borrowed code from sndfile-jackplay.c (sndfile-tools-1.03, Erik de Castro Lopo & Jonatan Liljedahl), where is interesting the thread implementation  (playing while reading the file) that I didn't implemented.<br><br>c) jplay-sndfile:<br>*http://wiki.joanillo.org/images/e/e6/Jplay-sndfile-1.0.0.tar.gz<br>This is more interesting and not simple like the previous. A part of playing back the file, it permits frequency shifting and frequency sweeping in a range between .5 and 2.<br><br>Hope this helps to somebody,<br>Joan Quintana<br></td></tr></table>