Skip to content


Subversion checkout URL

You can clone with
Download ZIP
simple amd / audio player
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


This is an amd-ready audio load/play module

Method outline

load(url::string, callback::fn(audioId::int))

  • Loads a sound file from an url, prepares it and stores it in the local buffer. Upon completion the callback is invoked with an id that can be used to play the sound.

loadAll(urls::[string], callback::fn(resources::hash))

  • Loads all sounds, specified in the array. Upon completion the callback is invoked, passing a hash that maps resourceIds that correspond to the filenames without path, specified in the urls aray to audioIds that can be used to play sounds.

play(audioId::int, loop::bool)

  • Play the sound


  • Stop the sound

prepare(data::arraybuffer, callback::fn(audioId::int))

  • Will try to decode the data from the arraybuffer, invoking the callback with audioId on success, throwing an exception on failure.
Something went wrong with that request. Please try again.