Class ParameterReader

Receive parameter changes, lock free, no gc, between a UI thread (browser main thread or worker) and a real-time thread (in an AudioWorkletProcessor). Write and Reader cannot change roles after setup, unless externally synchronized.

GC can happen during the initial construction of this object when hopefully no audio is being output. This depends on the implementation.

Parameter changes are like in the VST framework: an index and a float value (no restriction on the value).

This class supports up to 256 parameters, but this is easy to extend if needed.

An element is an index, that is an unsigned byte, and a float32, which is 4 bytes.

Constructors

Methods

  • Attempt to dequeue a single parameter change.

    Parameters

    • o: { index: number; value: number }

      An object with two attributes: index and value.

    Returns boolean

    true if a parameter change has been dequeued, false otherwise.

  • Attempt to dequeue a single parameter change.

    Parameters

    • o: { index: number; value: number }

      An object with two attributes: index and value.

    Returns boolean

    true if a parameter change has been dequeued, false otherwise.

MMNEPVFCICPMFPCPTTAAATR