API

Interface StaticSoundPlayOptions

Per-play overrides for playSound.

interface StaticSoundPlayOptions {
    duration?: number;
    loop?: boolean;
    loopEnd?: number;
    loopStart?: number;
    pitch?: number;
    playbackRate?: number;
    startOffset?: number;
    volume?: number;
    waitTime?: number;
}
Index
duration?: number

Play duration in seconds (0 = full buffer).

loop?: boolean

Loop playback.

loopEnd?: number

Loop end point in seconds.

loopStart?: number

Loop start point in seconds.

pitch?: number

Detune of this instance, in cents. Defaults to the sound's pitch.

playbackRate?: number

Playback rate multiplier of this instance. Defaults to the sound's playbackRate.

startOffset?: number

Start offset in seconds.

volume?: number

Per-instance volume.

waitTime?: number

Delay before playback starts, in seconds.