private void stopAndRelease(boolean killThread) {
        if(killThread && mAudioThread != null) {
            mAudioThread.interrupt();
        }

        if(mAudioTrack != null) {
            if(isInitialized()) {
                mAudioTrack.stop();
            }
            mAudioTrack.release();
        }
        mAudioTrack = null;
    }
Handle playback head reset bug

affected: Galaxy S2 API 16
not affected: Nexus 4 API 22

Sometimes the playback head does not really reset to zero in a pause. During the
pause, it correctly returns zero (0), but when playback continues it sometimes
continues from the previous playback head position instead of starting from zero.
Since this does not always happen, this looks to be a bug in the Android framework.

TODO find out if this is a reported bug

To work around this issue, we subtract the playback head position time from the PTS
offset to adjust the base time by the playback head time. This leads to the
{@link #getCurrentPresentationTimeUs} method returning a correct value.
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/AudioPlayback.java