How to reproduce:
Click the Start/Stop button many times. App crashes.
The exception is thrown on AudioGenerator createPlayer().
The exception is about that:
AudioFlinger could not create track, status: -12
[android.media.AudioTrack ] Error code -20 when initializing AudioTrack.
Not sure why this is happening. My guess is that the AudioTrack binds some resources that later aren't properly released.