Package wavFiles

Class WavFile

java.lang.Object
wavFiles.WavFile
Direct Known Subclasses:
WavFileReader, WavFileWriter

public class WavFile extends Object
  • Field Details Link icon

  • Constructor Details Link icon

    • WavFile Link icon

      protected WavFile(String fileName, String fileMode)
      Open a wav file for reading.

      Parameters:
      fileName - file name with full path
      fileMode - mode = "r" for read or "w" for write
  • Method Details Link icon

    • finalize Link icon

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • readWavHeader Link icon

      public WavHeader readWavHeader()
      Read the wav header - assumes that file ref is already at the start of the file.
      Returns:
      the Wav header.
    • getWavHeader Link icon

      public WavHeader getWavHeader()
      Returns:
      the wavHeader
    • positionAtData Link icon

      public boolean positionAtData()
    • setPosition Link icon

      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 Link icon

      protected boolean reportError(String warningText)
    • close Link icon

      public void close()
    • getFileName Link icon

      public String getFileName()
      Returns:
      the fileName
    • getCurrentFormat Link icon

      public AudioFormat getCurrentFormat()
      Returns:
      the currentFormat