This repository has been archived by the owner on Nov 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Audio
Tor (torbuntu) edited this page Sep 29, 2019
·
5 revisions
The Audio
object contains the API for Leikr audio methods.
The Leikr Audio engine is pretty limited and works mostly with 16 bit wav files.
void playSound(String name)
: plays a sound fx from the Audio/Sound
directory of a game.
void playSound(String name, vol, pit, pan)
: Like the above but with extra options for volume, pitch and pan.
void stopSound()
: Stops the sounds playing
void playMusic(String name)
: Plays a music wav file from the Audio/Music
directory.
void playMusic(String name, boolean loop)
: Same as above but with an optional loop flag.
void stopAllMusic()
: Stops playing all music
void stopMusic(fileName)
: Stops a playing music file by name.
void pauseAudio()
: Pauses all playing audio.