|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
An AudioPlayerProvider represents any kind of audio source that can present audio data to an AudioPlayer to be played and/or can process recorded audio data in any way.
| Method Summary | |
|---|---|
boolean |
canLoop()
Ask this provider, if he can provide audio data in a loop. |
boolean |
canProvide()
Ask this provider, if he is ready for providing playback audio data |
boolean |
canRec()
Ask this provider, if he can process recorded audio data in any way. |
javax.sound.sampled.AudioInputStream |
getAudioInputStream()
Provide an AudioInputStream for playback |
int |
getLastStart()
Get the last start position inside the whole audio source. |
int |
rec(byte[] b,
int offset,
int length)
Process a recorded buffer of audio data. |
javax.sound.sampled.AudioFormat |
startRec()
Start recording of audio data. |
void |
stopRec()
Notification from the AudioPlayer that recording has finished. |
| Method Detail |
|---|
boolean canLoop()
boolean canProvide()
boolean canRec()
javax.sound.sampled.AudioInputStream getAudioInputStream()
throws NotReadyException
NotReadyException - If no audio data can be presented at the
momentint getLastStart()
getAudioInputStream()
int rec(byte[] b,
int offset,
int length)
startRec() and stopRec().
The delivered audio data will be in the format returned by
startRec().
b - The Array containing the audio data to processoffset - Offset position inside the Array where the usable audio
data beginslength - The length of the usable audio data in bytes
length, the AudioPlayer will re-attempt to write the
remaining data in the next call.
javax.sound.sampled.AudioFormat startRec()
throws NotReadyException
NotReadyException - If recording is not possible at the momentvoid stopRec()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||