API reference
Preparing search index…

Play short sound effects from memory, holding a SoundBuffer to retain sample storage.

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory53

Constructors

Properties

Methods

Constructors

  • Bind an audio buffer, or copy a Sound's attributes and buffer reference.

    Parameters

    bufferOrSource

        | Readonly<
            Pick<
                SoundBuffer,
                | typeof audioHandle
                | "getSamples"
                | "getSampleCount"
                | "getSampleRate"
                | "getChannelCount"
                | "getChannelMap"
                | "getDuration"
                | "saveToFile",
            >,
        >
        | Sound

    Returns

    Source & inheritance

Properties

times: BigInt64Array
Source & inheritance
values: Float32Array
Source & inheritance
Cone: typeof Cone = Cone

Directional cone configuration type.

Source & inheritance
Status: typeof SoundStatus = SoundStatus

Playback status enumeration.

Source & inheritance

Methods

  • Return a read-only reference to the currently bound buffer.

    Returns

    Readonly
    Source & inheritance
  • Replace and retain the audio buffer reference, updating the native source.

    Parameters

    buffer
    Readonly

    Returns

    void
    Source & inheritance

Symbol members

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

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