|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Basic interface which is extended by AudioSource and AudioSink. Provides methods for setting/getting the AudioFormat and ContentType, and the state of this object
| Field Summary | |
static int |
END_OF_DATA
sent as a value for length of data when there is no more data available to be read or written. |
| Method Summary | |
void |
addTransferListener(TransferListener listener)
Adds a TransferListener to receive notification when data is passed to or from this AudioObject |
boolean |
canSetAudioFormat()
Returns false if the AudioFormat cannot be set - eg some Recognizers may not be able to change their input format, so the CGAudioManager (which is an AudioSink) for that Recognizer will return false here. |
void |
drain()
Blocks until END_OF_DATA is written to or read from this AudioObject. |
javax.sound.sampled.AudioFormat |
getAudioFormat()
Returns the AudioFormat for this AudioObject. |
java.lang.String |
getContentType()
|
boolean |
isPaused()
|
boolean |
isWaiting()
Returns true if no data has yet been written or read from this AudioObject |
void |
removeTransferListener(TransferListener listener)
|
void |
setAudioFormat(javax.sound.sampled.AudioFormat format)
Sets the AudioFormat for this AudioObject. |
void |
setContentType(java.lang.String contentType)
Sets the content type for this AudioObject - contentType must be one of the FileTypeDescriptor String fields, eg MPEG_AUDIO. |
void |
setPaused(boolean paused)
If paused is true, writing or reading data to or from this AudioObject will block until setPaused(false) is called. |
| Field Detail |
public static final int END_OF_DATA
| Method Detail |
public javax.sound.sampled.AudioFormat getAudioFormat()
setAudioFormat(javax.sound.sampled.AudioFormat)
public void setAudioFormat(javax.sound.sampled.AudioFormat format)
throws java.io.IOException
This ensures that the AudioFormat is uniform along a set of connected AudioObjects until the format is changed by an AudioConverter.
java.io.IOException - if unable to set the AudioFormat for any reason
(eg. if canSetAudioFormat returns false and setAudioFormat is used
to try to change the AudioFormat).getAudioFormat()public boolean canSetAudioFormat()
public boolean isPaused()
public void setPaused(boolean paused)
public boolean isWaiting()
public void drain()
throws java.io.IOException
public void setContentType(java.lang.String contentType)
throws java.io.IOException
public java.lang.String getContentType()
setContentTypepublic void addTransferListener(TransferListener listener)
public void removeTransferListener(TransferListener listener)
addTransferListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||