Package wavFiles
Class WavFile
java.lang.Object
wavFiles.WavFile
- Direct Known Subclasses:
 WavFileReader,WavFileWriter
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteConverterprotected AudioFormatprotected Stringprotected Stringprotected WavHeaderprotected WindowsFile - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()booleanRead the wav header - assumes that file ref is already at the start of the file.protected booleanreportError(String warningText) booleansetPosition(long sampleNumber) Set the file pointer at a specific sample. 
- 
Field Details
- 
fileName
 - 
fileMode
 - 
windowsFile
 - 
wavHeader
 - 
byteConverter
 - 
currentFormat
 
 - 
 - 
Constructor Details
- 
WavFile
Open a wav file for reading.- Parameters:
 fileName- file name with full pathfileMode- mode = "r" for read or "w" for write
 
 - 
 - 
Method Details
- 
finalize
 - 
readWavHeader
Read the wav header - assumes that file ref is already at the start of the file.- Returns:
 - the Wav header.
 
 - 
getWavHeader
- Returns:
 - the wavHeader
 
 - 
positionAtData
public boolean positionAtData() - 
setPosition
public boolean setPosition(long sampleNumber) Set the file pointer at a specific sample. Only for files open in read mode !- Parameters:
 sampleNumber- sample number- Returns:
 - true if OK, false if it failed.
 
 - 
reportError
 - 
close
public void close() - 
getFileName
- Returns:
 - the fileName
 
 - 
getCurrentFormat
- Returns:
 - the currentFormat
 
 
 -