better, but more complex PCM recording & playback example