Class LineOutMonoSampleWriter

    • Constructor Detail

      • LineOutMonoSampleWriter

        public LineOutMonoSampleWriter​()
    • Method Detail

      • writeNext

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

        public void writeNext​(MonoSample 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<MonoSample>
        Specified by:
        writeNext in interface SampleWriter<MonoSample,LineOutMonoSampleWriter>
        Parameters:
        aSample - The samples, one for each channel.
        Throws:
        IOException - thrown in case writing the sample caused an I/O related problem.
      • getSamplingRate

        public int getSamplingRate​()
        Retrieves the sampling rate from the sampling rate property.
        Specified by:
        getSamplingRate in interface SamplingRateAccessor
        Returns:
        The sampling rate stored by the sampling rate property.
      • setSamplingRate

        public void setSamplingRate​(int aSamplingRate)
        Sets the sampling rate for the sampling rate property.
        Specified by:
        setSamplingRate in interface SamplingRateAccessor.SamplingRateMutator
        Parameters:
        aSamplingRate - The sampling rate to be stored by the sampling rate property.