Skip to content
This repository has been archived by the owner on Nov 13, 2022. It is now read-only.
Tor (torbuntu) edited this page Sep 13, 2020 · 5 revisions

Leikr Sound API

Version 0.0.19

The lAudio object contains the API for Leikr audio methods.

The Leikr Audio engine is pretty limited and works mostly with 16 bit wav, ogg, and mp3 files.

Audio API
Sound getSound(String name) returns the Sound object to be manually used in code.
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 all sounds from playing.
void stopSound(String name) Stops a specific sound from playing.
Music getMusic(String name) returns the Music object to be manually used in code.
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 stopMusic() Stops playing all music.
void stopMusic(fileName) Stops a playing music file by name.
void pauseAudio() Pauses all playing audio.
void resumeAudio() Tries to resume playing all paused audio. Note: Some Sounds do not resume.

Contents

Home

API

under construction for version 1.10.1

Clone this wiki locally