framework/src/org/apache/cordova/AudioPlayer.java
/**
     * Destroy player and stop audio playing or recording.
     */
Destroy player and stop audio playing or recording.
Destroy player and stop audio playing or recording .
public void destroy() {
        if (this.mPlayer != null) {
            if ((this.state == MEDIA_RUNNING) || (this.state == MEDIA_PAUSED)) {
                this.mPlayer.stop();
                this.setState(MEDIA_STOPPED);
            }
            this.mPlayer.release();
            this.mPlayer = null;
        }
        if (this.recorder != null) {
            this.stopRecording();
            this.recorder.release();
            this.recorder = null;
        }
    }
public void destroy ( ) { if ( this . mPlayer != null ) { if ( ( this . state == MEDIA_RUNNING ) || ( this . state == MEDIA_PAUSED ) ) { this . mPlayer . stop ( ) ; this . setState ( MEDIA_STOPPED ) ; } this . mPlayer . release ( ) ; this . mPlayer = null ; } if ( this . recorder != null ) { this . stopRecording ( ) ; this . recorder . release ( ) ; this . recorder = null ; } }
Destroy player and stop audio playing or recording.
Destroy player and stop audio playing or recording .
// Stop any play or record