Three implementation are provided: a HTML 5 one, a SoundManager one and an empty one. The most stable is obviously the SoundManager wrapper. The HTML 5 is still in developement and since HML5 specification are not finished it still evolving. The empty one (“bogus”) is there as a starting point for the developement of your own wrapper. If you’ve developped your own wrapper don’t hesitate to share it, I’ll gladly put it on this site.
A sound wrapper is in fact a sound object with a series of conventional functions. Any object that corespond to this convention can be used as sound wrapper, you can find the description of those function in the The $.gameQuery.Sound Object section bellow.
To use the HTML5 sound wrapper you just need to add the script to you page. It has to be addded after the gameQuery script. There is no other requierment but keep in mind that this will be compatible only with the browser supporting the HTML5 audio object.
Except for the constructor, the methods of this object are of interest only to people developing their own wrapper.
The constructor, it take the url of the sound and a boolean to indicate if the sound should be looped or not.
This function should start the playing of the sound.
This function should pause the sound. After a call to this function a sucessive call to
play() should play the sound from the position it where paused.
This function should stop the sound. After a call to this function a sucessive call to
play() should play the sound from the start.
true is passed, this function should mute the sound without pausing or stoping it. If
false is passed it should unmute the sound.
This function returns
true if the sound is ready to be played,