|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface representing a class which accepts audio data, and which can be connected to an AudioSource.
Fields inherited from interface com.cloudgarden.audio.AudioObject |
END_OF_DATA |
Method Summary | |
AudioSource |
getSource()
Returns the AudioSource set by setSource |
void |
setSource(AudioSource source)
Sets the source for this sink - this method should also call the setSink method on the source object (while avoiding an endless loop) to ensure that sink and source are connected to each other (and not to different sinks/sources). |
int |
write(byte[] data,
int len)
Convenience method - should call write(data, 0, len) |
int |
write(byte[] data,
int offset,
int len)
Used to write data to this sink - called by the AudioSource which this sink is connected to (if its startSending method is used) so need not be called explicitly by an application. |
Methods inherited from interface com.cloudgarden.audio.AudioObject |
addTransferListener, canSetAudioFormat, drain, getAudioFormat, getContentType, isPaused, isWaiting, removeTransferListener, setAudioFormat, setContentType, setPaused |
Method Detail |
public int write(byte[] data, int offset, int len) throws java.io.IOException
setSource(com.cloudgarden.audio.AudioSource)
,
AudioSource.startSending()
,
AudioObject.setPaused(boolean)
public int write(byte[] data, int len) throws java.io.IOException
public void setSource(AudioSource source) throws java.io.IOException
If the source's AudioFormat is null or the source's format differs from this AudioSink's format, then the source's format is set equal to that of this AudioSink.
If the source's AudioFormat is not null and this AudioSink's format is null then this AudioSink's format is set equal to the source's.
The same is done for the ContentType as described above for the AudioFormat.
getSource()
public AudioSource getSource()
setSource(com.cloudgarden.audio.AudioSource)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |