Engine API Reference - v2.20.0-beta.0
    Preparing search index...

    Class Sound

    Represents the raw audio data of a playable sound. A Sound is the resource of an audio Asset. An audio asset can be assigned to a SoundSlot owned by a SoundComponent.

    Index

    Constructors

    Properties

    Accessors

    Constructors

    • Create a new Sound instance.

      Parameters

      Returns Sound

    Properties

    buffer: AudioBuffer

    Contains the decoded audio data.

    Accessors

    • get duration(): number

      Gets the duration of the sound. If the sound is not loaded it returns 0.

      Returns number