I based parts of the app on Ringdroid, using its code to do the waveform display and the selection sliders.