AutoCloseable
, CsvSampleWriter<MonoSample,B>
, MonoSampleWriter<CsvMonoSampleWriter>
, SampleWriter<MonoSample,B>
, SamplingRateAccessor
, SamplingRateAccessor.SamplingRateBuilder<CsvMonoSampleWriter>
, SamplingRateAccessor.SamplingRateMutator
, SamplingRateAccessor.SamplingRateProperty
, org.refcodes.io.RowWriter<CsvMonoSampleWriter>
public class CsvMonoSampleWriter extends AbstractCsvSampleWriter<MonoSample,CsvMonoSampleWriter> implements MonoSampleWriter<CsvMonoSampleWriter>
CsvMonoSampleWriter
provides means to write sound samples to a
CSV file.SamplingRateAccessor.SamplingRateBuilder<B extends SamplingRateAccessor.SamplingRateBuilder<B>>, SamplingRateAccessor.SamplingRateMutator, SamplingRateAccessor.SamplingRateProperty
_csvWriter, _deltaMode
Constructor | Description |
---|---|
CsvMonoSampleWriter(File aFile) |
Constructs the
CsvMonoSampleWriter for writing sound samples to a
CSV file or stream. |
CsvMonoSampleWriter(File aFile,
CsvDeltaMode aDeltaMode) |
Constructs the
CsvMonoSampleWriter for writing sound samples to a
CSV file or stream. |
CsvMonoSampleWriter(OutputStream aOutputStream) |
Constructs the
CsvMonoSampleWriter for writing sound samples to a
CSV file or stream. |
CsvMonoSampleWriter(OutputStream aOutputStream,
CsvDeltaMode aDeltaMode) |
Constructs the
CsvMonoSampleWriter for writing sound samples to a
CSV file or stream. |
CsvMonoSampleWriter(PrintStream aPrintStream) |
Constructs the
CsvMonoSampleWriter for writing sound samples to a
CSV file or stream. |
CsvMonoSampleWriter(PrintStream aPrintStream,
CsvDeltaMode aDeltaMode) |
Constructs the
CsvMonoSampleWriter for writing sound samples to a
CSV file or stream. |
Modifier and Type | Method | Description |
---|---|---|
int |
getSamplingRate() |
Retrieves the sampling rate from the sampling rate property.
|
void |
setSamplingRate(int aSamplingRate) |
Sets the sampling rate for the sampling rate property.
|
CsvMonoSampleWriter |
withSamplingRate(int aSamplingRate) |
Sets the sampling rate for the sampling rate property.
|
void |
writeNext(double aSampleData) |
Writes the next samples, one sample for each channel.
|
void |
writeNext(MonoSample aSample) |
Writes the next samples, one sample for each channel.
|
close, format, toDouble, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
letSamplingRate
public CsvMonoSampleWriter(File aFile) throws FileNotFoundException
CsvMonoSampleWriter
for writing sound samples to a
CSV file or stream.aFile
- The File
where to write the CSV records to.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.public CsvMonoSampleWriter(OutputStream aOutputStream)
CsvMonoSampleWriter
for writing sound samples to a
CSV file or stream.aOutputStream
- The OutputStream
where to write the CSV
records to.public CsvMonoSampleWriter(PrintStream aPrintStream)
CsvMonoSampleWriter
for writing sound samples to a
CSV file or stream.aPrintStream
- The PrintStream
where to write the CSV
records to.public CsvMonoSampleWriter(File aFile, CsvDeltaMode aDeltaMode) throws FileNotFoundException
CsvMonoSampleWriter
for writing sound samples to a
CSV file or stream.aFile
- The File
where to write the CSV records to.aDeltaMode
- The CsvDeltaMode
to use when writing the CSV
rows.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.public CsvMonoSampleWriter(OutputStream aOutputStream, CsvDeltaMode aDeltaMode)
CsvMonoSampleWriter
for writing sound samples to a
CSV file or stream.aOutputStream
- The OutputStream
where to write the CSV
records to.aDeltaMode
- The CsvDeltaMode
to use when writing the CSV
rows.public CsvMonoSampleWriter(PrintStream aPrintStream, CsvDeltaMode aDeltaMode)
CsvMonoSampleWriter
for writing sound samples to a
CSV file or stream.aPrintStream
- The PrintStream
where to write the CSV
records to.aDeltaMode
- The CsvDeltaMode
to use when writing the CSV
rows.public void writeNext(double aSampleData)
writeNext
in interface MonoSampleWriter<CsvMonoSampleWriter>
aSampleData
- The samples, one for each channel.public void writeNext(MonoSample aSample)
writeNext
in interface org.refcodes.io.RowWriter<CsvMonoSampleWriter>
writeNext
in interface SampleWriter<MonoSample,B extends MonoSampleWriter<B>>
aSample
- The samples, one for each channel.public int getSamplingRate()
getSamplingRate
in interface SamplingRateAccessor
public void setSamplingRate(int aSamplingRate)
setSamplingRate
in interface SamplingRateAccessor.SamplingRateMutator
aSamplingRate
- The sampling rate to be stored by the sampling
rate property.public CsvMonoSampleWriter withSamplingRate(int aSamplingRate)
withSamplingRate
in interface SamplingRateAccessor.SamplingRateBuilder<CsvMonoSampleWriter>
aSamplingRate
- The sampling rate to be stored by the sampling
rate property.Copyright © 2021. All rights reserved.