|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.speech4j.sound.AudioOutputStream
Audion output to a stream. Do not use this class for handling big amounts of audio data because it keeps all the data in memory until close(). Use AudioOutputFile instead.
Constructor Summary | |
AudioOutputStream(java.io.OutputStream out,
javax.sound.sampled.AudioFormat format)
Creates AudioOutputStream |
Method Summary | |
void |
close()
Closes output |
long |
length()
Returns size of output. |
double |
time()
Returns time length of output. |
void |
write(AudioBuffer buffer)
Writes AudioBuffer performing format conversion if necessary. |
void |
write(javax.sound.sampled.AudioInputStream ais,
int cnt)
Writes cnt bytes from AudioInputStream performing format conversion if necessary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AudioOutputStream(java.io.OutputStream out, javax.sound.sampled.AudioFormat format) throws java.io.FileNotFoundException, java.io.IOException
out
- OutputStreamformat
- AudioFormat
java.io.FileNotFoundException
java.io.IOException
Method Detail |
public void write(AudioBuffer buffer) throws java.io.IOException, SoundException
buffer
- Audio buffer
java.io.IOException
SoundException
public void write(javax.sound.sampled.AudioInputStream ais, int cnt) throws java.io.IOException, SoundException
ais
- AudioInputStreamcnt
- number of bytes to write
java.io.IOException
SoundException
public void close() throws java.io.IOException
java.io.IOException
public long length() throws java.io.IOException
java.io.IOException
public double time() throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |