API

Interface StaticSound

A buffer-backed sound. Pure state — drive it with the sound functions.

interface StaticSound {
    buffer: SoundBuffer;
    instanceCount: number;
    name?: string;
    onEnded: AudioSignal<StaticSound>;
    state: SoundState;
}
Index
buffer: SoundBuffer

The decoded buffer this sound plays.

instanceCount: number

Number of live instances.

name?: string

Optional name.

Fires when the sound finishes (all instances ended).

state: SoundState

Current playback state.