cacophony
    Preparing search index...

    Class LoudnessMeter

    Index
    • Parameters

      • node: AudioWorkletNode

        The constructed loudness-meter AudioWorkletNode.

      • source: AudioNode

        The node whose output is being metered. Its output is branched into node here; the source's existing connections are untouched (the audible path is preserved).

      • OptionalsilentSink: GainNode

        Optional zero-gain node owned by the meter. When supplied, the worklet output is connected through it to sinkDestination, keeping the metering worklet on a pulled graph without adding audible output.

      • OptionalsinkDestination: AudioNode

        Destination for the owned zero-gain sink.

      Returns LoudnessMeter

    onUpdate?: (reading: LoudnessReading) => void

    Invoked on every report from the worklet (~10×/s) with the latest readings. Assign a function to observe live loudness; leave undefined to poll the cached getters instead.

    • Stops metering: removes the branch tap from the source and detaches the message listener. The audible path (the source's other edges) is untouched.

      Returns void

    • Resets the integrated-loudness gate accumulator and the true-peak hold on the worklet (momentary/short-term keep sliding). Use to start a fresh integrated measurement of a new programme.

      Returns void