gameforge - v0.1.12
    Preparing search index...

    Interface Options

    Options to use for creating sounds.

    interface Options {
        autoPlay?: boolean;
        complete?: CompleteCallback;
        loaded?: LoadedCallback;
        loop?: boolean;
        preload?: boolean;
        singleInstance?: boolean;
        source?: ArrayBuffer | HTMLAudioElement | AudioBuffer;
        speed?: number;
        sprites?: Record<string, SoundSpriteData>;
        url?: string | string[];
        volume?: number;
    }
    Index

    Properties

    autoPlay?: boolean

    true to immediately start preloading.

    false
    
    complete?: CompleteCallback

    Global complete callback when play is finished.

    loaded?: LoadedCallback

    Call when finished loading.

    loop?: boolean

    Initial loop value, true is loop infinitely

    false
    
    preload?: boolean

    true to immediately start preloading if loading from url.

    singleInstance?: boolean

    true to disallow playing multiple layered instances at once.

    false
    
    source?: ArrayBuffer | HTMLAudioElement | AudioBuffer

    If sound is already preloaded, available.

    speed?: number

    The playback rate where 1 is 100% speed.

    1
    
    sprites?: Record<string, SoundSpriteData>

    The map of sprite data. Where a sprite is an object with a start and end, which are the times in seconds. Optionally, can include a speed amount where 1 is 100% speed.

    url?: string | string[]

    The source of the file being loaded

    volume?: number

    The amount of volume 1 = 100%.

    1