public void stop() {
        if(mPlaybackThread != null) {
            // Create a new lock object for this release cycle
            mReleaseSyncLock = new Object();

            synchronized (mReleaseSyncLock) {
                try {
                    // Schedule release on the playback thread
                    boolean awaitingRelease = mPlaybackThread.release();
                    mPlaybackThread = null;

                    // Wait for the release on the playback thread to finish
                    if (awaitingRelease) {
                        mReleaseSyncLock.wait();
                    }
                } catch (InterruptedException e) {
                    // nothing to do here
                }
            }

            mReleaseSyncLock = null;
        }

        stayAwake(false);

        mAudioPlayback = null;

        mCurrentState = State.STOPPED;
    }
Stops the player and releases the playback thread. The player will consume minimal resources
after calling this method. To continue playback, the player must first be prepared with
{@link #prepare()} or {@link #prepareAsync()}.
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/MediaPlayer.java