Skip to content
Browse files

Updated with usage instructions

  • Loading branch information...
1 parent 075d3f2 commit 7d81038bd20fc43963b8f8a3d22aa65b6b33e327 @GrahamRanson GrahamRanson committed Sep 5, 2012
Showing with 58 additions and 2 deletions.
  1. +58 −2 README.md
View
60 README.md
@@ -1,4 +1,60 @@
GGSound
-=======
+============
-GGSound allows for easy management of sound effects and global volume in your Corona SDK powered apps.
+GGSound allows for easy management of sound effects and global volume in your Corona SDK powered apps.
+
+Basic Usage
+-------------------------
+
+##### Require the code
+```lua
+local GGSound = require( "GGSound" )
+```
+
+##### Create your sound library
+```lua
+local sound = GGSound:new{ 1, 2, 3 } -- Create the library passing in some channel numbers, these should be reserved by you.
+```
+
+##### Add some sounds
+```lua
+sound:add( "sound1.wav", "sound1" )
+sound:add( audio.loadStream( "sound2.wav" ), "sound2" ) -- A preloaded sound.
+```
+
+##### Set the volume
+```lua
+sound:setVolume( 0.8 )
+```
+
+##### Play a sound
+```lua
+sound:play( "sound2" )
+```
+
+##### Disable all playback. Useful for debugging
+```lua
+sound.enabled = false
+```
+
+##### Remove a sound
+```lua
+sound:remove( "sound2" )
+```
+
+##### Remove all sounds
+```lua
+sound:removeAll()
+```
+
+##### Destroy the library
+```lua
+sound:destroy()
+sound = nil
+```
+
+Update History
+-------------------------
+
+##### 0.1
+Initial release

0 comments on commit 7d81038

Please sign in to comment.
Something went wrong with that request. Please try again.