Interface SoundSampleWriter<B extends SoundSampleWriter<B>>

    • Method Detail

      • writeNext

        void writeNext​(double... aSample)
                throws IOException
        Writes 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.
        Parameters:
        aSample - The samples, one for each channel.
        Throws:
        IOException - thrown in case writing the sample caused an I/O related problem.
      • writeNext

        void writeNext​(SoundSample aSample)
                throws IOException
        Writes 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.
        Specified by:
        writeNext in interface org.refcodes.io.RowWriter<B extends SoundSampleWriter<B>>
        Specified by:
        writeNext in interface SampleWriter<SoundSample,​B extends SoundSampleWriter<B>>
        Parameters:
        aSample - The samples, one for each channel.
        Throws:
        IOException - thrown in case writing the sample caused an I/O related problem.