-
Notifications
You must be signed in to change notification settings - Fork 230
AudioSource
Adrien GIVRY edited this page Sep 26, 2020
·
3 revisions
Represents an audio source. Its position in the world is important if the spatial sound settings is on
- C++ related class:
OvCore::ECS::Components::CAudioSource
- Inherits from lua usertype:
Component
This usertype has no variables
Name | Input | Output | Description |
---|---|---|---|
new | AudioSource |
Default Constructor |
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 : instanceUsertype : sound |
Defines the sound to play on the audio source | |
SetVolume |
AudioSource : instancenumber : volume |
Defines the audio source volume | |
SetPan |
AudioSource : instancenumber : pan |
Defines the audio source pan (Left / Right) | |
SetLooped |
AudioSource : instanceboolean : loop |
Defines if the audio source should loop | |
SetPitch |
AudioSource : instancenumber : pitch |
Defines the audio source pitch (= frequency or playback speed) | |
SetSpatial |
AudioSource : instanceboolean : spatial |
Defines if the audio source should be spatialized or not | |
SetAttenuationThreshold |
AudioSource : instancenumber : threshold |
Defines the audio source attenuation threshold (Minimum distance before applying sound attenuation) |
This usertype has no operators