public class SoundSample
extends java.lang.Object
| Constructor and Description |
|---|
SoundSample(java.lang.String name,
int midiRootNote,
ManagedAudioInputStream ais)
Contruct a sound sample with predefined values
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
protected void |
finalize() |
javax.sound.sampled.AudioFormat |
getFomat() |
long |
getLoopEnd() |
long |
getLoopStart()
return -1 if the sound has no loop
|
ManagedAudioInputStream |
getManagedAudioInputStream()
create a new ManagedStream for the sound,
managed audio stream contains the sound,
the stream is ready to play
|
int |
getMidiRootNote() |
java.lang.String |
getName() |
void |
setLoopEnd(long loopEnd) |
void |
setLoopStart(long loopStart) |
void |
setMidiRootNote(int midiRootNote) |
void |
setName(java.lang.String name) |
public SoundSample(java.lang.String name,
int midiRootNote,
ManagedAudioInputStream ais)
throws java.io.IOException
name - the name of the samplemidiRootNote - the midi root notewavdata - the wavdata associatedjava.io.IOExceptionpublic java.lang.String getName()
public void setName(java.lang.String name)
public int getMidiRootNote()
public void setMidiRootNote(int midiRootNote)
public void setLoopStart(long loopStart)
public void setLoopEnd(long loopEnd)
public long getLoopStart()
public long getLoopEnd()
public javax.sound.sampled.AudioFormat getFomat()
public ManagedAudioInputStream getManagedAudioInputStream() throws java.lang.Exception
java.lang.Exceptionpublic void dispose()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable