|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.engine.effect.sound.SampledSound
public class SampledSound
This class represents a sampled sound file like, that can be easily played via its play() method. It is not based on the Java Sound API, but simply uses the Applet-Soundplayer. You will use this class for playing wave files (.wav) basically. No compressed sound formats like mp3 or ogg are supported.
| Constructor Summary | |
|---|---|
SampledSound(java.lang.String path,
boolean loop)
Initializes the sampled sound object with the sound file specified by the path parameter. |
|
| Method Summary | |
|---|---|
java.lang.String |
getSoundPath()
Returns the file path to the sound file. |
boolean |
isLooped()
Determines if the sound was specified to be looped. |
void |
play()
Starts playing the assigned sound file. |
void |
stop()
Stops playing the assigned sound file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SampledSound(java.lang.String path,
boolean loop)
path - path to a sound fileloop - loop the sound file? --> true=yes, false=no| Method Detail |
|---|
public java.lang.String getSoundPath()
SoundFileIface
getSoundPath in interface SoundFileIfacepublic boolean isLooped()
SoundFileIface
isLooped in interface SoundFileIfacepublic void play()
SoundFileIface
play in interface SoundFileIfacepublic void stop()
SoundFileIface
stop in interface SoundFileIface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||