com.cloudgarden.audio
Class DefaultAudioConverter
java.lang.Object
|
+--com.cloudgarden.audio.DefaultAudioObject
|
+--com.cloudgarden.audio.DefaultAudioSource
|
+--com.cloudgarden.audio.DefaultAudioConnector
|
+--com.cloudgarden.audio.DefaultAudioConverter
- All Implemented Interfaces:
- AudioConnector, AudioConverter, AudioObject, AudioSink, AudioSource
- Direct Known Subclasses:
- AudioFormatConverter, AudioMediaFormatConverter
- public abstract class DefaultAudioConverter
- extends DefaultAudioConnector
- implements AudioConverter
Field Summary |
protected java.lang.String |
srcContentType
|
protected javax.sound.sampled.AudioFormat |
srcFmt
|
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.AudioObject |
addTransferListener, canSetAudioFormat, drain, getAudioFormat, getContentType, isPaused, isWaiting, removeTransferListener, setAudioFormat, setContentType, setPaused |
srcFmt
protected javax.sound.sampled.AudioFormat srcFmt
srcContentType
protected java.lang.String srcContentType
DefaultAudioConverter
public DefaultAudioConverter()
setSource
public void setSource(AudioSource src)
throws java.io.IOException
- Description copied from interface:
AudioSink
- 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). Also ensures continuity of the
AudioFormat and ContentType (as described below).
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.
- Specified by:
setSource
in interface AudioSink
- Overrides:
setSource
in class DefaultAudioConnector
- Following copied from interface:
com.cloudgarden.audio.AudioSink
- See Also:
AudioSink.getSource()
getIncomingAudioFormat
public javax.sound.sampled.AudioFormat getIncomingAudioFormat()
- Specified by:
getIncomingAudioFormat
in interface AudioConverter
getIncomingContentType
public java.lang.String getIncomingContentType()
- Specified by:
getIncomingContentType
in interface AudioConverter
setIncomingAudioFormat
public void setIncomingAudioFormat(javax.sound.sampled.AudioFormat format)
throws java.io.IOException
- Specified by:
setIncomingAudioFormat
in interface AudioConverter
setIncomingContentType
public void setIncomingContentType(java.lang.String contentType)
- Specified by:
setIncomingContentType
in interface AudioConverter