|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.cloudgarden.audio.DefaultAudioObject | +--com.cloudgarden.audio.DefaultAudioSource | +--com.cloudgarden.audio.DefaultAudioConnector
Field Summary | |
protected AudioSource |
source
|
Fields inherited from class com.cloudgarden.audio.DefaultAudioSource |
sending, sendThread, sink |
Fields inherited from class com.cloudgarden.audio.DefaultAudioObject |
contentType, exception, format, listeners, paused, pauseSync, running, waiting |
Fields inherited from interface com.cloudgarden.audio.AudioObject |
END_OF_DATA |
Constructor Summary | |
DefaultAudioConnector()
|
Method Summary | |
AudioSource |
getSource()
Returns the AudioSource set by setSource |
void |
setSource(AudioSource src)
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) |
Methods inherited from class com.cloudgarden.audio.DefaultAudioSource |
drain, getSink, isSending, read, setAudioFormat, setBufferSize, setContentType, setSink, startSending, stopSending |
Methods inherited from class com.cloudgarden.audio.DefaultAudioObject |
addTransferListener, blockWhilePaused, blockWhileWaiting, bytesTransferred, canSetAudioFormat, getAudioFormat, getContentType, getLastException, isPaused, isWaiting, removeTransferListener, setPaused |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.cloudgarden.audio.AudioSource |
getSink, isSending, read, read, setSink, startSending, stopSending |
Methods inherited from interface com.cloudgarden.audio.AudioObject |
addTransferListener, canSetAudioFormat, drain, getAudioFormat, getContentType, isPaused, isWaiting, removeTransferListener, setAudioFormat, setContentType, setPaused |
Methods inherited from interface com.cloudgarden.audio.AudioSink |
write |
Field Detail |
protected AudioSource source
Constructor Detail |
public DefaultAudioConnector()
Method Detail |
public int write(byte[] data, int len) throws java.io.IOException
AudioSink
write
in interface AudioSink
public void setSource(AudioSource src) throws java.io.IOException
AudioSink
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.
setSource
in interface AudioSink
com.cloudgarden.audio.AudioSink
AudioSink.getSource()
public AudioSource getSource()
AudioSink
getSource
in interface AudioSink
com.cloudgarden.audio.AudioSink
AudioSink.setSource(com.cloudgarden.audio.AudioSource)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |