SoundInst Class
A playing instance of a sound (or promise to play as soon as it loads). These can only be created through cloudkid.Sound.instance.play().
Item Index
Methods
Methods
pause
()
public
Pauses this SoundInst.
stop
()
public
Stops this SoundInst.
unpause
()
public
Unpauses this SoundInst.
updateVolume
-
contextVol
Updates the volume of this SoundInst.
Parameters:
-
contextVol
NumberThe volume of the sound context that the sound belongs to. If omitted, the volume is automatically collected.
Properties
_channel
createjs.SoundInstance
private
SoundJS SoundInstance, essentially a sound channel.
_fDur
Number
private
The duration in milliseconds for the fade that this sound instance is performing.
_fTime
Number
private
The current time in milliseconds for the fade that this sound instance is performing.
_startFunc
Function
private
User's callback function for when the sound starts. This is only used if the sound wasn't loaded before play() was called.
_startParams
Array
private
An array of relevant parameters passed to play(). This is only used if the sound wasn't loaded before play() was called.
curVol
Number
public
The current sound volume (0 to 1). This is multiplied by the sound context's volume. Setting this won't take effect until updateVolume() is called.
isValid
Bool
public
An active SoundInst should always be valid. This is primarily for compatability with cloudkid.Audio.
length
Number
public
The length of the sound in milliseconds. This is 0 if it hasn't finished loading.
paused
Bool
public
If the sound is currently paused. Setting this has no effect - use pause() and unpause().
position
Number
public
The position of the sound playhead in milliseconds, or 0 if it hasn't started playing yet.