public class WavFileReaderWriter extends java.lang.Object implements AudioFileReader, AudioFileWriter
| Constructor and Description |
|---|
WavFileReaderWriter() |
| Modifier and Type | Method and Description |
|---|---|
SampleAudioFormat |
getSampleAudioFormat()
|
java.util.HashSet<AudioFileType> |
getSupportedFileTypesForReading()
|
java.util.HashSet<AudioFileType> |
getSupportedFileTypesForWriting()
|
float[][] |
readAudioFile(java.lang.String filename)
|
void |
writeAudioFile(float[][] data,
java.lang.String filename,
AudioFileType type,
SampleAudioFormat saf)
|
public void writeAudioFile(float[][] data,
java.lang.String filename,
AudioFileType type,
SampleAudioFormat saf)
throws java.io.IOException,
OperationUnsupportedException,
FileFormatException
writeAudioFile in interface AudioFileWriterdata - - the data to be writtenfilename - - the name of the file to be writtentype - - the type of audio file to be written (mp3, wav, etc.)saf - - a SampleAudioFormat object specifying the attributes of the sample data to be written. Can be NULL, in which case default values will be used.java.io.IOExceptionOperationUnsupportedExceptionFileFormatExceptionpublic java.util.HashSet<AudioFileType> getSupportedFileTypesForWriting()
getSupportedFileTypesForWriting in interface AudioFileWriterpublic float[][] readAudioFile(java.lang.String filename)
throws java.io.IOException,
OperationUnsupportedException,
FileFormatException
readAudioFile in interface AudioFileReaderfilename - - the name of the file to be readjava.io.IOExceptionOperationUnsupportedExceptionFileFormatExceptionpublic java.util.HashSet<AudioFileType> getSupportedFileTypesForReading()
getSupportedFileTypesForReading in interface AudioFileReaderpublic SampleAudioFormat getSampleAudioFormat()
getSampleAudioFormat in interface AudioFileReader