API reference
Preparing search index…

OutputSoundFile

Asynchronously encode interleaved 16-bit PCM into an audio file whose format is determined by the file extension.

Source & inheritance
Member directory5

Constructors

Properties

Methods

Constructors

Methods

  • Wait for all writes, flush the encoder, and close the file to ensure complete file contents.

    Returns

    Promise<void>
    Source & inheritance
  • Close the previous output and asynchronously create a file, with sample rate in Hz; return whether it succeeded.

    Parameters

    filename
    string
    sampleRate
    number
    channelCount
    number
    channelMap
    Iterable<SoundChannel>

    Returns

    Promise<boolean>
    Source & inheritance
  • Asynchronously encode samples in order; do not modify data until the Promise settles.

    Parameters

    data
    Int16Array

    Returns

    Promise<void>
    Source & inheritance

Symbol members

"[audioHandle]": AudioHandle<"output"> = ...
Source & inheritance

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