Package org.refcodes.audio
Interface MonoSampleWriter<B extends MonoSampleWriter<B>>
-
- Type Parameters:
B
- TheMonoSampleWriter
implementing thisMonoSampleWriter
.
- All Superinterfaces:
AutoCloseable
,org.refcodes.io.RowWriter<B>
,SampleWriter<MonoSample,B>
,SamplingRateAccessor
,SamplingRateAccessor.SamplingRateBuilder<B>
,SamplingRateAccessor.SamplingRateMutator
,SamplingRateAccessor.SamplingRateProperty
- All Known Implementing Classes:
CsvMonoSampleWriter
,LineOutMonoSampleWriter
,SvgMonoSampleWriter
,WavMonoSampleWriter
public interface MonoSampleWriter<B extends MonoSampleWriter<B>> extends SampleWriter<MonoSample,B>
TheMonoSampleWriter
writes sound samples to a stream or a file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.audio.SamplingRateAccessor
SamplingRateAccessor.SamplingRateBuilder<B extends SamplingRateAccessor.SamplingRateBuilder<B>>, SamplingRateAccessor.SamplingRateMutator, SamplingRateAccessor.SamplingRateProperty
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
writeNext(double aSample)
Writes the next samples, one sample for each channel.-
Methods inherited from interface org.refcodes.audio.SampleWriter
close, writeNext
-
Methods inherited from interface org.refcodes.audio.SamplingRateAccessor
getSamplingRate
-
Methods inherited from interface org.refcodes.audio.SamplingRateAccessor.SamplingRateBuilder
withSamplingRate
-
Methods inherited from interface org.refcodes.audio.SamplingRateAccessor.SamplingRateMutator
setSamplingRate
-
-
-
-
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.
-
-