public class WaveOutput extends Object
| Constructor and Description |
|---|
WaveOutput(WaveFormat format)
Create a new WaveOutput to output the specified wave format with the
specified stream parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
drain() |
boolean |
drained() |
long |
getFramePosition() |
int |
getFrameSize() |
long |
getMicrosecondPosition() |
int |
getVolume() |
void |
pause() |
void |
reset() |
void |
resume() |
void |
setPitch(int pitch) |
void |
setPlaybackRate(int rate) |
void |
setVolume(int left,
int right) |
void |
sync() |
int |
writeBlock(byte[] data,
int offset,
int length,
boolean isLastData) |
public WaveOutput(WaveFormat format) throws IOException
format - the format of the Wave output.pars - optional parameters for the WaveOutput stream.IOException - if it could not be created.public void reset()
throws IOException
IOExceptionpublic void pause()
throws IOException
IOExceptionpublic void resume()
throws IOException
IOExceptionpublic void setPitch(int pitch)
throws IOException
IOExceptionpublic void setPlaybackRate(int rate)
throws IOException
IOExceptionpublic long getFramePosition()
throws IOException
IOExceptionpublic long getMicrosecondPosition()
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic int writeBlock(byte[] data,
int offset,
int length,
boolean isLastData)
throws IOException
IOExceptionpublic int getFrameSize()
throws IOException
IOExceptionpublic int available()
throws IOException
IOExceptionpublic boolean drained()
throws IOException
IOExceptionpublic void drain()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void sync()
throws IOException
IOExceptionpublic int getVolume()
throws IOException
IOExceptionpublic void setVolume(int left,
int right)
throws IOException
IOException