AutoCloseable
, MonoSampleReader
, SampleReader<MonoSample>
, SamplingRateAccessor
, org.refcodes.io.RowReader<MonoSample>
, org.refcodes.mixin.IndexAccessor
public class CsvMonoSampleReader extends AbstractCsvSampleReader<MonoSample> implements MonoSampleReader
CsvMonoSampleReader
provides means to read sound samples from a
CSV file.org.refcodes.mixin.IndexAccessor.IndexBuilder<B extends org.refcodes.mixin.IndexAccessor.IndexBuilder<B>>, org.refcodes.mixin.IndexAccessor.IndexMutator, org.refcodes.mixin.IndexAccessor.IndexProperty
SamplingRateAccessor.SamplingRateBuilder<B extends SamplingRateAccessor.SamplingRateBuilder<B>>, SamplingRateAccessor.SamplingRateMutator, SamplingRateAccessor.SamplingRateProperty
_csvReader
Modifier | Constructor | Description |
---|---|---|
|
CsvMonoSampleReader(File aFile) |
Constructs the
CsvMonoSampleReader for writing sound samples to a
CSV file or stream. |
|
CsvMonoSampleReader(InputStream aInputStream) |
Constructs the
CsvMonoSampleReader for writing sound samples to a
CSV file or stream. |
protected |
CsvMonoSampleReader(org.refcodes.tabular.CsvStringRecordReader aCsvReader) |
Constructs the
CsvMonoSampleReader for writing sound samples to a
CSV file or stream. |
Modifier and Type | Method | Description |
---|---|---|
long |
getIndex() |
|
int |
getSamplingRate() |
Retrieves the sampling rate from the sampling rate property.
|
MonoSample |
readNext() |
|
double |
readNextMonoData() |
Reads the next samples, one sample for each channel.
|
close, doProbeHeader, hasNext
close
public CsvMonoSampleReader(File aFile) throws ZipException, IOException
CsvMonoSampleReader
for writing sound samples to a
CSV file or stream.aFile
- The File
where to write the CSV records to.IOException
- thrown in case there was an I/O related problem.ZipException
- Signals that a Zip exception of some sort has
occurred.public CsvMonoSampleReader(InputStream aInputStream) throws IOException
CsvMonoSampleReader
for writing sound samples to a
CSV file or stream.aInputStream
- The InputStream
where to write the CSV
records to.IOException
- thrown in case there was an I/O related problem.protected CsvMonoSampleReader(org.refcodes.tabular.CsvStringRecordReader aCsvReader)
CsvMonoSampleReader
for writing sound samples to a
CSV file or stream.aCsvReader
- The CsvStringRecordReader
with which to write
the CSV records with.public MonoSample readNext() throws IOException
readNext
in interface org.refcodes.io.RowReader<MonoSample>
IOException
public double readNextMonoData() throws IOException
readNextMonoData
in interface MonoSampleReader
IOException
- thrown in case there was an I/O related problem.public int getSamplingRate()
getSamplingRate
in interface SamplingRateAccessor
public long getIndex()
getIndex
in interface org.refcodes.mixin.IndexAccessor
Copyright © 2021. All rights reserved.