Skip to content

AudioSource

Adrien GIVRY edited this page Sep 26, 2020 · 3 revisions

Description

Represents an audio source. Its position in the world is important if the spatial sound settings is on

Variables

This usertype has no variables

Constructors

Name Input Output Description
new AudioSource Default Constructor

Functions

Name Input Output Description
Play AudioSource: instance
Plays the attached sounds
Stop AudioSource: instance
Stops playback
Pause AudioSource: instance
Suspend playback
Resume AudioSource: instance
Resume the playback from where it get suspended
GetSound AudioSource: instance
Usertype Returns the sound attached to the audio source
GetVolume AudioSource: instance
number Returns the current volume
GetPan AudioSource: instance
number Returns the pan
IsLooped AudioSource: instance
boolean Returns true if the AudioSource is setup to loop
GetPitch AudioSource: instance
number Returns the pitch
IsFinished AudioSource: instance
boolean Returns true if the audio source sound has finished
IsSpatial AudioSource: instance
boolean Returns true if the audio source is spatialized
GetAttenuationThreshold AudioSource: instance
number Returns the audio source attenuation threshold (Minimum distance before applying sound attenuation)
SetSound AudioSource: instance
Usertype: sound
Defines the sound to play on the audio source
SetVolume AudioSource: instance
number: volume
Defines the audio source volume
SetPan AudioSource: instance
number: pan
Defines the audio source pan (Left / Right)
SetLooped AudioSource: instance
boolean: loop
Defines if the audio source should loop
SetPitch AudioSource: instance
number: pitch
Defines the audio source pitch (= frequency or playback speed)
SetSpatial AudioSource: instance
boolean: spatial
Defines if the audio source should be spatialized or not
SetAttenuationThreshold AudioSource: instance
number: threshold
Defines the audio source attenuation threshold (Minimum distance before applying sound attenuation)

Operators

This usertype has no operators

Clone this wiki locally