Class BB_Sound
Defined in: Sound.js.
Constructor Attributes | Constructor Name and Description |
---|---|
BB_Sound(callback)
Sound manager
|
Field Attributes | Field Name and Description |
---|---|
<static> |
BB_Sound.notes
Sound notes
chanells separated by pipe
notes separated by comas
note format:
- the first number is the length 1/n
- character and nmber pairs represents music note and octave
|
Method Attributes | Method Name and Description |
---|---|
create()
Generate sound with the worker process
|
|
disable()
Disable/Enable sounds
|
|
finish(data)
Create audio tag
|
|
play(index, volume, loop)
Play sound
|
|
stop(index)
Stop playing
|
Field Detail
<static>
BB_Sound.notes
Sound notes
chanells separated by pipe
notes separated by comas
note format:
- the first number is the length 1/n
- character and nmber pairs represents music note and octave
Method Detail
create()
Generate sound with the worker process
{Boolean}
disable()
Disable/Enable sounds
- Returns:
- {Boolean}
finish(data)
Create audio tag
- Parameters:
- {String} data
- Base64 encoded WAV data
play(index, volume, loop)
Play sound
- Parameters:
- {Number} index
- {Number} volume
- {Boolean} loop
stop(index)
Stop playing
- Parameters:
- {Number} index