This is an example application that mimics some of the effects of the Kaos effect pad (http://www.youtube.com/watch?v=owkeBOcC-AQ). It can loop, echo, and filter audio on an Android 2.2. It comes with a graphical touchpad and an effect changer.
This code includes a compiled version of libmp3 to decode the source mp3. Because it uses a software decoder, the buffer can become unwieldy and degrades quality after a minute or two (> 43ms behind), thus why the project was abandoned.
Enjoy!