API reference
Preparing search index…

SoundRecorderCallbacks

Recording callbacks executed in a Node Worker.

interface SoundRecorderCallbacks {
    onProcessSamples(samples: Int16Array): boolean | Promise<boolean>;
    onStart(): boolean | Promise<boolean>;
    onStop(): void | Promise<void>;
}
Source & inheritance
Member directory3

Methods

Methods

  • Consume interleaved 16-bit PCM; the view is valid until the callback settles. Return false to stop recording.

    Parameters

    samples
    Int16Array

    Returns

    boolean | Promise<boolean>
    Source & inheritance
  • Initialize before capture starts; return false to reject startup.

    Returns

    boolean | Promise<boolean>
    Source & inheritance
  • Perform cleanup after capture stops and the queue drains.

    Returns

    void | Promise<void>
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0