Class Index | File Index

Classes


Class R.sound.AbstractSoundSystem

Sound system abstraction class for pluggable sound architecture. The R.sound.AbstractSoundSystem class is used to separate the sound manager from the resource loader and sound objects.
Defined in: abstractsoundsystem.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
destroySound(sound)
[ABSTRACT] Destroy the given sound object
 
[ABSTRACT] Get the length (duration) of the sound object, in milliseconds
 
[ABSTRACT] Get the position, in milliseconds, within a playing or paused sound
 
[ABSTRACT] Determine if the sound object is ready to be used
 
getSoundSize(sound)
[ABSTRACT] Get the size of the sound object, in bytes
 
Returns a flag indicating if the sound system is ready
 
loadSound(resourceLoader, name, url)
Load a sound using the sound system.
 
muteSound(sound)
[ABSTRACT] Mute the given sound object
 
pauseSound(sound)
[ABSTRACT] Pause the given sound object
 
playSound(sound)
[ABSTRACT] Play the given sound object
 
resumeSound(sound)
[ABSTRACT] Resume the given sound object
 
setSoundPan(sound, pan)
[ABSTRACT] Pan the given sound object from left to right
 
setSoundPosition(sound, millisecondOffset)
[ABSTRACT] Set the position, within the sound's length, to play at
 
setSoundVolume(sound, volume)
[ABSTRACT] Set the volume of the given sound object
 
[ABSTRACT] Shut down the sound system
 
stopSound(sound)
[ABSTRACT] Stop the given sound object
 
unmuteSound(sound)
[ABSTRACT] Unmute the given sound object
Class Detail
R.sound.AbstractSoundSystem()
Method Detail
destroySound(sound)
[ABSTRACT] Destroy the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

{Number} getSoundDuration(sound)
[ABSTRACT] Get the length (duration) of the sound object, in milliseconds
Parameters:
sound
{R.resources.types.Sound} The sound object
Returns:
{Number}

{Number} getSoundPosition(sound)
[ABSTRACT] Get the position, in milliseconds, within a playing or paused sound
Parameters:
sound
{R.resources.types.Sound} The sound object
Returns:
{Number}

{Boolean} getSoundReadyState(sound)
[ABSTRACT] Determine if the sound object is ready to be used
Parameters:
sound
{R.resources.types.Sound} The sound object
Returns:
{Boolean} true if the sound is ready

{Number} getSoundSize(sound)
[ABSTRACT] Get the size of the sound object, in bytes
Parameters:
sound
{R.resources.types.Sound} The sound object
Returns:
{Number}

{Boolean} isReady()
Returns a flag indicating if the sound system is ready
Returns:
{Boolean}

{R.resources.types.Sound} loadSound(resourceLoader, name, url)
Load a sound using the sound system. If the sound system isn't ready, sounds will be queued until it is ready.
Parameters:
resourceLoader
{R.resources.loades.SoundLoader} The sound resource loader
name
{String} The name of the sound object
url
{String} The URL of the sound to load
Returns:
{R.resources.types.Sound} The sound object

muteSound(sound)
[ABSTRACT] Mute the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

pauseSound(sound)
[ABSTRACT] Pause the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

playSound(sound)
[ABSTRACT] Play the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

resumeSound(sound)
[ABSTRACT] Resume the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

setSoundPan(sound, pan)
[ABSTRACT] Pan the given sound object from left to right
Parameters:
sound
{R.resources.types.Sound} The sound object
pan
{Number} A value between -100 and 100, with -100 being full left and zero being center

setSoundPosition(sound, millisecondOffset)
[ABSTRACT] Set the position, within the sound's length, to play at
Parameters:
sound
{R.resources.types.Sound} The sound object
millisecondOffset
{Number} The millisecond offset from the start of the sounds duration

setSoundVolume(sound, volume)
[ABSTRACT] Set the volume of the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object
volume
{Number} A value between 0 and 100, with 0 being muted

shutdown()
[ABSTRACT] Shut down the sound system

stopSound(sound)
[ABSTRACT] Stop the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

unmuteSound(sound)
[ABSTRACT] Unmute the given sound object
Parameters:
sound
{R.resources.types.Sound} The sound object

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:20 GMT-0400 (EDT)