-
Notifications
You must be signed in to change notification settings - Fork 15
Audio Methods
Plays an audio file that matches the given path.
Parameters:
path - The path you want to play an audio file from
Alias: playSound
Example:
playAudio("Sounds/SomeSounds/run.mp3");
playAudio("Sounds/SomeSounds/run*.mp3"); -> Selects file at random from all files that start with run and end with .mp3
playAudio("Sounds/SomeSounds/*.mp3");
playAudio("Sounds/SomeSounds/*.{mp3,wav}");
Plays an audio file that matches the given path and if wait is true waits for the audio file to end before continuing.
Parameters:
path - The path you want to play an audio file from
wait - Whether you want to wait for the audio file to end
Alias: playSound
Example:
playAudio("Sounds/SomeSounds/run.mp3", true);
Stops all audio that is being played right now.
Example:
stopAudio();
Stops the specific audio file if it is being played right now.
Parameters:
path - The path to the audio file that you want to stop playing
Example:
stopAudio("Sounds/SomeSounds/run.mp3");