Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (47 sloc) 992 Bytes

GGSound

GGSound allows for easy management of sound effects and global volume in your Corona SDK powered apps.

Basic Usage

Require the code
local GGSound = require( "GGSound" )
Create your sound library
local sound = GGSound:new{ 1, 2, 3 } -- Create the library passing in some channel numbers, these should be reserved by you.
Add some sounds
sound:add( "sound1.wav", "sound1" )
sound:add( audio.loadStream( "sound2.wav" ), "sound2" ) -- A preloaded sound.
Set the volume
sound:setVolume( 0.8 )
Play a sound
sound:play( "sound2" )
Disable all playback. Useful for debugging
sound.enabled = false
Remove a sound
sound:remove( "sound2" )
Remove all sounds
sound:removeAll()
Destroy the library
sound:destroy()
sound = nil

Update History

0.1

Initial release