|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimogl.effect.sound.SampledSound
public class SampledSound
This class represents a sampled file like .wav files, that can be easily played via its play() method. It is not based on the Java Sound API, but simply uses the Applet-Soundplayer.
| Constructor Summary | |
|---|---|
SampledSound()
Creates a new ampled sound object without providing an initial sound file. |
|
SampledSound(java.lang.String path)
Initializes the sampled sound object with the sound file specified by the path parameter. |
|
| Method Summary | |
|---|---|
void |
play(boolean loop)
Plays the audio file currently assigned to the sampled sound object |
void |
setSound(java.lang.String path)
Assignes a sound file to the sampled sound object |
void |
stop()
Stops the currently playing 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)
path - path to a sound filepublic SampledSound()
| Method Detail |
|---|
public void setSound(java.lang.String path)
path - path to the sound filepublic void play(boolean loop)
loop - play sound in loop? --> true = yes, false = nopublic void stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||