public static enum Audio.Soundclip extends java.lang.Enum<Audio.Soundclip>
Enum Constant and Description |
---|
dhtin |
newdoc |
remotesearch |
Modifier and Type | Field and Description |
---|---|
private javax.sound.sampled.AudioFormat |
aisFormat |
private javax.sound.sampled.Clip |
clip |
private byte[] |
data |
java.lang.String |
filename |
Modifier and Type | Method and Description |
---|---|
private void |
ensureLoaded() |
private javax.sound.sampled.Clip |
getClip() |
private javax.sound.sampled.Clip |
getFreshClip() |
void |
play(float gain)
play a soundclip once
|
void |
playExperimental()
Experimental alternative implementation of play() which reads the sound data and plays it with own methods.
|
void |
start()
play the soundclip continuously
|
void |
stop()
stop a continuously playing soundclip
|
static Audio.Soundclip |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Audio.Soundclip[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Audio.Soundclip dhtin
public static final Audio.Soundclip newdoc
public static final Audio.Soundclip remotesearch
public final java.lang.String filename
private javax.sound.sampled.Clip clip
private javax.sound.sampled.AudioFormat aisFormat
private byte[] data
public static Audio.Soundclip[] values()
for (Audio.Soundclip c : Audio.Soundclip.values()) System.out.println(c);
public static Audio.Soundclip valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullprivate javax.sound.sampled.Clip getClip()
private javax.sound.sampled.Clip getFreshClip()
public void start()
public void stop()
public void play(float gain)
public void playExperimental() throws java.io.IOException
java.io.IOException
private void ensureLoaded() throws java.io.IOException
java.io.IOException