|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jsyn.util.WaveFileWriter
public class WaveFileWriter
Write audio data to a WAV file. Just write float data, then close().
Constructor Summary | |
---|---|
WaveFileWriter(java.io.File outputFile)
Create a writer that will write to the specified file. |
Method Summary | |
---|---|
void |
close()
|
void |
setBitsPerSample(int i)
Only 16 bit samples supported at the moment. |
void |
setFrameRate(int frameRate)
|
void |
setSamplesPerFrame(int samplesPerFrame)
For stereo, set this to 2. |
void |
write(double value)
Write audio to the WAV file. |
void |
write(double[] buffer)
Write audio to the WAV file. |
void |
write(double[] buffer,
int start,
int count)
Write audio to the WAV file. |
void |
writeDataChunkHeader()
Write a 'data' chunk header to the WAV file. |
void |
writeFormatChunk()
Write an 'fmt ' chunk to the WAV file containing the given information. |
void |
writeIntLittle(int n)
Write a 32 bit integer to the stream in Little Endian format. |
void |
writeShortLittle(short n)
Write a 16 bit intgeer to the stream in Little Endian format. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WaveFileWriter(java.io.File outputFile) throws java.io.FileNotFoundException
outputFile
-
java.io.FileNotFoundException
Method Detail |
---|
public void setFrameRate(int frameRate)
public void setSamplesPerFrame(int samplesPerFrame)
public void setBitsPerSample(int i)
public void close() throws java.io.IOException
close
in interface AudioOutputStream
java.io.IOException
public void write(double[] buffer) throws java.io.IOException
write
in interface AudioOutputStream
java.io.IOException
public void write(double value) throws java.io.IOException
write
in interface AudioOutputStream
java.io.IOException
public void write(double[] buffer, int start, int count) throws java.io.IOException
write
in interface AudioOutputStream
java.io.IOException
public void writeIntLittle(int n) throws java.io.IOException
java.io.IOException
public void writeShortLittle(short n) throws java.io.IOException
java.io.IOException
public void writeFormatChunk() throws java.io.IOException
java.io.IOException
public void writeDataChunkHeader() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |