API reference
Preparing search index…

InputSoundFile

Seekable audio decoder reading interleaved 16-bit PCM asynchronously in invocation order.

Source & inheritance
Member directory15

Constructors

Properties

Methods

Constructors

Methods

  • Wait for prior operations, then asynchronously close the decoder and release its retained data source.

    Returns

    Promise<void>
    Source & inheritance
  • Return the current sample offset, including all interleaved channels.

    Returns

    bigint
    Source & inheritance
  • Asynchronously open an audio file and read its format information, returning whether it succeeded.

    Parameters

    filename
    string

    Returns

    Promise<boolean>
    Source & inheritance
  • Asynchronously open encoded audio bytes, returning whether it succeeded.

    Parameters

    data
    Uint8Array

    Returns

    Promise<boolean>
    Source & inheritance
  • Asynchronously decode into data, returning the actual number of samples written; return 0n at the end. Do not modify the buffer before completion.

    Parameters

    data
    Int16Array

    Returns

    Promise<bigint>
    Source & inheritance

Symbol members

"[audioHandle]": AudioHandle<"input">
Source & inheritance

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