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 AudioFileWriter
data
- - 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.IOException
OperationUnsupportedException
FileFormatException
public java.util.HashSet<AudioFileType> getSupportedFileTypesForWriting()
getSupportedFileTypesForWriting
in interface AudioFileWriter
public float[][] readAudioFile(java.lang.String filename) throws java.io.IOException, OperationUnsupportedException, FileFormatException
readAudioFile
in interface AudioFileReader
filename
- - the name of the file to be readjava.io.IOException
OperationUnsupportedException
FileFormatException
public java.util.HashSet<AudioFileType> getSupportedFileTypesForReading()
getSupportedFileTypesForReading
in interface AudioFileReader
public SampleAudioFormat getSampleAudioFormat()
getSampleAudioFormat
in interface AudioFileReader