private void pauseInternal(boolean drainAudioPlayback) {
            // When playback is paused in timed API21 render mode, the remaining cached frames will
            // still be rendered, resulting in a short but noticeable pausing lag. This can be avoided
            // by switching to the old render timing mode.
            mHandler.removeMessages(PLAYBACK_LOOP); // removes remaining loop requests (required when EOS is reached)
            if (mAudioPlayback != null) {
                if(drainAudioPlayback) {
                    // Defer pausing the audio playback for the length of the playback buffer, to
                    // make sure that all audio samples have been played out.
                    mHandler.sendEmptyMessageDelayed(PLAYBACK_PAUSE_AUDIO,
                            (mAudioPlayback.getQueueBufferTimeUs() + mAudioPlayback.getPlaybackBufferTimeUs()) / 1000 + 1);
                } else {
                    mAudioPlayback.pause(false);
                }
            }
        }
Removes a cue added by {@link #addCue(int, Object)} from the playback timeline.

@param cue the cue to remove
@return true if removal was successful, false if the cue wasn't cued on the timeline,
i.e. it has already been removed before
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/MediaPlayer.java