games.stendhal.client.soundreview
Class AudioClip
java.lang.Object
games.stendhal.client.soundreview.AudioClip
public class AudioClip
- extends java.lang.Object
This is an audio clip.
- Author:
- mtotz
|
Constructor Summary |
AudioClip(javax.sound.sampled.Mixer mixer,
byte[] audioData,
int volume)
creates the audio clip. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AudioClip
public AudioClip(javax.sound.sampled.Mixer mixer,
byte[] audioData,
int volume)
throws javax.sound.sampled.UnsupportedAudioFileException,
java.io.IOException
- creates the audio clip.
- Parameters:
mixer - the Mixer instance to be usedaudioData - the audio datavolume - the loudness 0..100
- Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
getLength
public int getLength()
- Returns:
- Returns the length.
getVolume
public int getVolume()
- Returns:
- Returns the volume.
openLine
public javax.sound.sampled.Clip openLine()
throws javax.sound.sampled.UnsupportedAudioFileException,
java.io.IOException,
javax.sound.sampled.LineUnavailableException
- opens the given line with the encapsulated audio data.
- Returns:
- the supported open line or null
- Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
javax.sound.sampled.LineUnavailableException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
stop
public void stop()