Taos API Reference
    Preparing search index...

    Interface AudioSourceOptions

    Configuration for an AudioSource.

    interface AudioSourceOptions {
        clip?: AudioClip | null;
        bus?: BusName;
        loop?: boolean;
        volume?: number;
        playbackRate?: number;
        spatial?: boolean;
        spatialOptions?: SpatialOptions;
        autoplay?: boolean;
    }
    Index

    Properties

    clip?: AudioClip | null

    Clip to play. May also be assigned later via the clip field.

    bus?: BusName

    Bus to route through. Default 'sfx'.

    loop?: boolean

    Loop until stopped. Default false.

    volume?: number

    Per-voice volume. Default 1.

    playbackRate?: number

    Playback rate / pitch. Default 1.

    spatial?: boolean

    Spatialize at the GameObject's world position. Default true.

    spatialOptions?: SpatialOptions

    Panner tuning when spatial.

    autoplay?: boolean

    Start playing as soon as the component attaches. Default false.