|
jjdh API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdh.javax.sound.filter.SoundFilter
public abstract class SoundFilter
A abstract class designed to filter sound samples. Since SoundFilters may use internal buffering of samples, a new SoundFilter object should be created for every sound played. However, SoundFilters can be reused after they are finished by called the reset() method.
Assumes all samples are 16-bit, signed, little-endian format.
FilteredSoundStream
Constructor Summary | |
---|---|
SoundFilter()
|
Method Summary | |
---|---|
void |
filter(byte[] samples)
Filters an array of samples. |
abstract void |
filter(byte[] samples,
int offset,
int length)
Filters an array of samples. |
int |
getRemainingSize()
Gets the remaining size, in bytes, that this filter plays after the sound is finished. |
static short |
getSample(byte[] buffer,
int position)
Convenience method for getting a 16-bit sample from a byte array. |
void |
reset()
Resets this SoundFilter. |
static void |
setSample(byte[] buffer,
int position,
short sample)
Convenience method for setting a 16-bit sample in a byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SoundFilter()
Method Detail |
---|
public void reset()
public int getRemainingSize()
public void filter(byte[] samples)
public abstract void filter(byte[] samples, int offset, int length)
public static short getSample(byte[] buffer, int position)
public static void setSample(byte[] buffer, int position, short sample)
|
jjdh API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |