@turbowarp/types
    Preparing search index...
    interface Loudness {
        audioContext: AudioContext;
        connectingToMic: boolean;
        mic: MediaStreamAudioSourceNode;
        getLoudness(): number;
    }
    Index

    Properties

    audioContext: AudioContext
    connectingToMic: boolean
    mic: MediaStreamAudioSourceNode

    Methods

    • Get the current loudness of sound received by the microphone. Sound is measured in RMS and smoothed.

      Returns number

      Loudness scaled 0 to 100, or -1 if there is no microphone input.