Interface MonoSampleReader

All Superinterfaces:
AutoCloseable, org.refcodes.mixin.IndexAccessor, org.refcodes.io.RowReader<MonoSample>, SampleReader<MonoSample>, SamplingRateAccessor
All Known Implementing Classes:
CsvMonoSampleReader

public interface MonoSampleReader extends SampleReader<MonoSample>
The MonoSampleReader reads sound samples from a stream or a file.
  • Method Details

    • nextMonoData

      double nextMonoData() throws IOException
      Reads the next samples, one sample for each channel. Provide one sample for mono audio, two samples for stereo audio and so on. In case you provide more or less samples than channels being supported by the writer, then it is up to the writer whether to duplicate the samples or calculate an average or the like.
      Returns:
      The samples, one for each channel.
      Throws:
      IOException - thrown in case there was an I/O related problem.