com.speech4j.sound
Interface AudioOutput

All Known Implementing Classes:
AudioOutputFile

public interface AudioOutput

Audio output interface.

Version:
1.1
Author:
Pavel Vlasov

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.
 

Method Detail

write

public void write(AudioBuffer buffer)
           throws java.io.IOException,
                  SoundException
Writes AudioBuffer performing format conversion if necessary.

Parameters:
buffer - Audio buffer
java.io.IOException
SoundException

write

public void write(javax.sound.sampled.AudioInputStream ais,
                  int cnt)
           throws java.io.IOException,
                  SoundException
Writes cnt bytes from AudioInputStream performing format conversion if necessary.

Parameters:
ais - AudioInputStream to write to
cnt - number of bytes to write
java.io.IOException
SoundException

close

public void close()
           throws java.io.IOException
Closes output

Throws:
java.io.IOException

length

public long length()
            throws java.io.IOException
Returns size of output.

Returns:
size of output in bytes.
Throws:
java.io.IOException

time

public double time()
            throws java.io.IOException
Returns time length of output.

Returns:
length of output in seconds.
Throws:
java.io.IOException


Copyright © 2003 Pavel Vlasov. All Rights Reserved.