gameforge - v0.1.12
    Preparing search index...

    Represents a single sound element. Can be used to play, pause, etc. sound instances.

    webaudio

    Implements

    Index

    Constructors

    Properties

    parent: Sound

    Reference to the parent Sound container.

    source: ArrayBuffer | AudioBuffer

    The file buffer to load.

    Accessors

    • get buffer(): AudioBuffer

      Gets and sets the buffer.

      Returns AudioBuffer

    • set buffer(buffer: AudioBuffer): void

      Parameters

      • buffer: AudioBuffer

      Returns void

    • get duration(): number

      Length of sound in seconds.

      Returns number

    • get isPlayable(): boolean

      Flag to check if sound is currently playable (e.g., has been loaded/decoded).

      Returns boolean

    • get nodes(): WebAudioNodes

      Get the current chained nodes object

      Returns WebAudioNodes

    Methods

    • Destructor, safer to use SoundLibrary.remove(alias) to remove this sound.

      Returns void

    • Re-initialize without constructing.

      Parameters

      • parent: Sound

        Instance of parent Sound container

      Returns void

    • Parameters

      • Optionalcallback: LoadedCallback

      Returns void