Class AbstractWavSampleWriter<S extends SoundSample,B extends WavSampleWriter<S,B>>

java.lang.Object
org.refcodes.audio.AbstractWavSampleWriter<S,B>
Type Parameters:
S - The SoundSample (sub-)type on which the SampleWriter implementation is to operate on.
B - The WavSampleWriter implementing this AbstractWavSampleWriter.
All Implemented Interfaces:
AutoCloseable, BitsPerSampleAccessor, BitsPerSampleAccessor.BitsPerSampleBuilder<B>, BitsPerSampleAccessor.BitsPerSampleMutator, BitsPerSampleAccessor.BitsPerSampleProperty, SampleWriter<S,B>, SamplingRateAccessor, SamplingRateAccessor.SamplingRateBuilder<B>, SamplingRateAccessor.SamplingRateMutator, SamplingRateAccessor.SamplingRateProperty, WavSampleWriter<S,B>, org.refcodes.io.RowWriter<S>
Direct Known Subclasses:
WavMonoSampleWriter, WavSoundSampleWriter

public abstract class AbstractWavSampleWriter<S extends SoundSample,B extends WavSampleWriter<S,B>> extends Object implements WavSampleWriter<S,B>
The AbstractWavSampleWriter provides a foundation means to write sound samples to a WAV file. Information on the WAV file format has been taken from the following article: "https://web.archive.org/web/20120113025807/http://technology.niagarac.on.ca:80/courses/ctec1631/WavFileFormat.html".
  • Field Details

  • Constructor Details

    • AbstractWavSampleWriter

      public AbstractWavSampleWriter(File aFile) throws FileNotFoundException
      Constructs the AbstractWavSampleWriter for writing sound samples to a WAV file or stream.
      Parameters:
      aFile - The File where to write the CSV records to.
      Throws:
      FileNotFoundException - If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created, or if some other error occurs while opening or creating the file.
    • AbstractWavSampleWriter

      public AbstractWavSampleWriter(OutputStream aOutputStream)
      Constructs the AbstractWavSampleWriter for writing sound samples to a WAV file or stream.
      Parameters:
      aOutputStream - The OutputStream where to write the CSV records to.
  • Method Details