|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SoundResource
A sound sample.
Currently supported formats are:
Nested Class Summary | |
---|---|
static interface |
SoundResource.Handle
Represents a sound that is currently playing. |
Method Summary | |
---|---|
long |
getDuration()
The duration in milliseconds of the SoundResource. |
boolean |
isReady()
Indicates that a particular SoundResource is ready for immediate playback. |
SoundResource.Handle |
play()
Play the sound. |
SoundResource.Handle |
play(int volume,
int pan)
Play the sound. |
SoundResource.Handle |
play(SoundResourceCallback callback)
Play the sound. |
SoundResource.Handle |
play(SoundResourceCallback callback,
int volume,
int pan)
Play the sound. |
void |
prepare(SoundResourceCallback callback)
Request that a demand-loaded sound resource is loaded and receive a callback when the SoundResource can be played. |
Methods inherited from interface com.google.gwt.libideas.resources.client.ResourcePrototype |
---|
getName |
Method Detail |
---|
long getDuration()
boolean isReady()
SoundResource.Handle play()
#prepare(ResourceCallback)
and play the sound when the
resource is ready.
SoundResource.Handle play(int volume, int pan)
#prepare(ResourceCallback)
and play the sound when the
resource is ready.
volume
- A number from 0 to 100. Out-of-range values will be coerced
into the acceptable range.pan
- A number from -100 (far left) to 100 (far right). Out-of-range
values will be coerced into the acceptable range.SoundResource.Handle play(SoundResourceCallback callback)
#prepare(ResourceCallback)
and play the sound when the
resource is ready.
callback
- A callback to be notified when the sound has finished
playing.SoundResource.Handle play(SoundResourceCallback callback, int volume, int pan)
#prepare(ResourceCallback)
and play the sound when the
resource is ready.
callback
- A callback to be notified when the sound has finished
playing.volume
- A number from 0 to 100. Out-of-range values will be coerced
into the acceptable range.pan
- A number from -100 (far left) to 100 (far right). Out-of-range
values will be coerced into the acceptable range.void prepare(SoundResourceCallback callback)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |