|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SoundConverter
Interface for easy integration of a sound converter to SoundPlayer and SoundPlayerExt classes. Typically a converter may apply some sort of 'filtering', e.g. change the pitch with same tempo or change the tempo with same pitch. The sound is converted by data junks. putSamples() feeds the converter with a new data junk. receiveSamples() returns the converted samples. Because there may be same convertion delay, receiveSamples() may return none, a part or all converted samples of data previously sent to the converter. If the number of available bytes exceeds 'maxBytes', receiveSamples() is called several times until all data is retrieved. The input and output format to the converter must have PCM_SIGNED mono or stereo format (16 bit little endian).
Method Summary | |
---|---|
void |
cleanup()
Callback method called when no more data is available before closing SoundPlayer's output to the sound device. |
void |
putSamples(byte[] inBuffer,
int numBytes)
Adds given number of bytes from the given buffer into the input of the converter. |
int |
receiveSamples(byte[] outBuffer,
int maxBytes)
Retrieves converted samples from the converted. |
void |
update()
Callback method called each time before the new samples from the inBuffer are fed into the converter. |
Method Detail |
---|
void putSamples(byte[] inBuffer, int numBytes)
int receiveSamples(byte[] outBuffer, int maxBytes)
void update()
void cleanup()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |