RSX Code Reference
    Preparing search index...

    Class AudioAbstract

    Provides global functionality relating to sounds and music.

    Index
    • get volume(): number

      Determines global audio volume. In range [0, 1].

      Returns number

    • set volume(value: number): void

      Parameters

      • value: number

      Returns void

    • Determines if audio reproduction is paused for the sceneInstance.

      Parameters

      Returns boolean

    • Starts playback of the provided audio clip as a 'one-shot' source. This can be used for a quicker way of creating audio sources if you don't need the full control provided by creating AudioSource manually.

      Parameters

      • sceneInstance: SceneInstance
      • clip: AudioClip

        Audio clip to play.

      • Optionalposition: Immutable<Vector3>

        Position in world space to play the clip at. Only relevant if the clip is 3D.

      • Optionalvolume: number

        Volume to play the clip at.

      • Optionalpitch: number

        The pitch of the clip. Default is 1.

      • OptionalminimumDistance: number

        The distance in units that no attenuation occurs. Default is 10.

      • Optionalattenuation: number

        Increases or lower distance attenuation. 0, disables distance attenuation. Default is 1.

      Returns ActiveAudioSource

      The AudioSource if successfull or null.

    • Pauses the audio for the specified sceneInstance. Set sceneInstance to null to pause all scenes.

      Parameters

      Returns void

      Implementing classes must call super.