|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.audio.AudioSampleWriter
public class AudioSampleWriter
Example methods for generating audio files.
The code source is http://www.builogic.com/java/javasound-read-write.html
| Constructor Summary | |
|---|---|
AudioSampleWriter(java.io.File file,
javax.sound.sampled.AudioFormat format,
javax.sound.sampled.AudioFileFormat.Type targetType)
Constructor for AudioSampleWriter instances. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
run()
|
void |
write(double[] interleavedSamples)
Encode the interleaved samples and write them to the file. |
void |
writeInterleavedSamples(double[] interleavedSamples,
int sampleCount)
Encode the interleaved samples and write them to the file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AudioSampleWriter(java.io.File file,
javax.sound.sampled.AudioFormat format,
javax.sound.sampled.AudioFileFormat.Type targetType)
throws java.io.IOException
file - The file that will receive the audio data.format - The audio format.targetType - The audio file format type.
java.io.IOException| Method Detail |
|---|
public void run()
run in interface java.lang.Runnable
public void write(double[] interleavedSamples)
throws java.io.IOException
interleavedSamples -
java.io.IOException
public void writeInterleavedSamples(double[] interleavedSamples,
int sampleCount)
throws java.io.IOException
interleavedSamples - sampleCount -
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||