Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 60 lines (47 sloc) 0.992 kb

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

Something went wrong with that request. Please try again.