|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.ui.standard.sound.AudioPlayer
public class AudioPlayer
A class to play sound files.
| Constructor Summary | |
|---|---|
AudioPlayer()
|
|
| Method Summary | |
|---|---|
void |
cleanAudioPlayer()
|
float |
getVolume()
Gets the volume of the audio player. |
boolean |
isMute()
Checks if the audio player is muted. |
void |
loop(java.lang.String filepath)
Play the clip in a loop. |
void |
meta(javax.sound.midi.MetaMessage meta)
|
void |
play(java.lang.String filepath)
Play a clip once. |
void |
setMute(boolean mute)
Sets if the audio player is mute or not. |
void |
setVolume(float volume)
Sets the volume for the audio player. |
void |
startMidiSound(java.lang.String filepath,
boolean loop)
Play compressed sound (mp3 or ogg files) The sounds are not cached in this case. |
void |
startPlayCompressedSound(java.lang.String filepath,
boolean loop)
Play compressed sound (mp3 or ogg files) The sounds are not cached in this case. |
void |
startPlayWavSound(java.lang.String filepath,
boolean loop)
Play and cache sound of type wav. |
void |
stop()
Stops the playing clip. |
void |
update(javax.sound.sampled.LineEvent event)
LineListener interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AudioPlayer()
| Method Detail |
|---|
public void startPlayWavSound(java.lang.String filepath,
boolean loop)
filepath - the file path to the soundloop - Should the sound clip be looped?
public void startPlayCompressedSound(java.lang.String filepath,
boolean loop)
filepath - filepath the file path to the soundloop - Should the sound clip be looped?
public void startMidiSound(java.lang.String filepath,
boolean loop)
filepath - filepath the file path to the soundloop - Should the sound clip be looped?public void play(java.lang.String filepath)
filepath - the filepath to the sound file.public void loop(java.lang.String filepath)
filepath - the filepath to the sound file.public void stop()
public float getVolume()
public void setVolume(float volume)
volume - (0.0 quiet, .5 medium, 1.0 loud)
(0.0 to 1.0 valid range)public boolean isMute()
public void setMute(boolean mute)
mute - is audio player mute?public void update(javax.sound.sampled.LineEvent event)
update in interface javax.sound.sampled.LineListenerpublic void cleanAudioPlayer()
public void meta(javax.sound.midi.MetaMessage meta)
meta in interface javax.sound.midi.MetaEventListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||