|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jack4j.util.file.wav.WavFileWriter
public class WavFileWriter
Creates WAV file.
This is very simple writer for WAV files. The instance must be closed after last sample was written.
Constructor Summary | |
---|---|
WavFileWriter(java.lang.String fileName,
int bitsPerSample,
int samplesPerSecond,
int channelCount)
|
Method Summary | |
---|---|
void |
close()
Closes the file. |
void |
writeSamples(java.nio.ByteBuffer[] channelBuffers,
int nframes)
Writes samples from specified buffers to the WAV file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WavFileWriter(java.lang.String fileName, int bitsPerSample, int samplesPerSecond, int channelCount) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void writeSamples(java.nio.ByteBuffer[] channelBuffers, int nframes) throws java.io.IOException
Buffers in the given array are used for corresponding channels. If the
array element at index i
is null, the channel
i
will be filled with 0db samples. If the array has less
elements than the number of channels, channels with higher numbers will
be all filled with 0db samples. If the array has more elements than the
number of channels, extra buffers will be ignored.
java.io.IOException
public void close() throws java.io.IOException
This method must be called after the last sample is written. The instance is unusable afterwards.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |