playSound
Script::playSound
Plays a global sound and returns a unique identifier to this sound source.
Declaration
SoundSourceID playSound(SoundID soundID, float gain = 1.0f, float pitch = 1.0f, bool looping = false);
Parameters
Name |
Type |
Description |
---|---|---|
soundID |
The sound to play or resume. |
|
gain |
float |
The initial sound source gain. |
pitch |
float |
The initial sound source pitch. |
looping |
bool |
Whether the sound is looping or not. |
Returns
A unique SoundSourceID.
Notes
Each time this function is called, a new sound source will be played and a new SoundSourceID will be returned.