Skip to main content

Source

Properties


audioClip (AudioClip)])
pitch (float)
gain (float)
loop (bool)

Constructor


Empty constructor

Methods


play()

Plays the audio clip

stop()

Stops the audio clip

pause()

Pauses the audio clip

setPitch(pitch : float)

Sets the pitch of the audio clip. 1.0 is normal pitch, 2.0 is an octave higher, 0.5 is an octave lower, etc.

setGain(gain : float)

Sets the gain of the audio clip

setLoop(loop : bool)

Sets whether the audio clip should loop or not

setAudioClip(audioClip : AudioClip)

Sets the audio clip to play