src/AudioRecorder.js
function stopAudioCapture() {

        // Disconnect media source node from script processor
        if (source)
            source.disconnect();

        // Disconnect associated script processor node
        if (processor)
            processor.disconnect();

        // Stop capture
        if (mediaStream) {
            var tracks = mediaStream.getTracks();
            for (var i = 0; i < tracks.length; i++)
                tracks[i].stop();
        }

        // Remove references to now-unneeded components
        processor = null;
        source = null;
        mediaStream = null;

        // End stream
        writer.sendEnd();

    }
function stopAudioCapture() {

        // Disconnect media source node from script processor
        if (source)
            source.disconnect();

        // Disconnect associated script processor node
        if (processor)
            processor.disconnect();

        // Stop capture
        if (mediaStream) {
            var tracks = mediaStream.getTracks();
            for (var i = 0; i < tracks.length; i++)
                tracks[i].stop();
        }

        // Remove references to now-unneeded components
        processor = null;
        source = null;
        mediaStream = null;

        // End stream
        writer.sendEnd();

    }
function stopAudioCapture ( ) { // Disconnect media source node from script processor if ( source ) source . disconnect ( ) ; // Disconnect associated script processor node if ( processor ) processor . disconnect ( ) ; // Stop capture if ( mediaStream ) { var tracks = mediaStream . getTracks ( ) ; for ( var i = 0 ; i < tracks . length ; i ++ ) tracks [ i ] . stop ( ) ; } // Remove references to now-unneeded components processor = null ; source = null ; mediaStream = null ; // End stream writer . sendEnd ( ) ; }
Stops capturing audio, if the capture has started, freeing all associated
resources. If the capture has not started, this function simply ends the
underlying Guacamole stream.

@private
Stops capturing audio if the capture has started freeing all associated resources . If the capture has not started this function simply ends the underlying Guacamole stream .