AutoCloseable
, SampleReader<SoundSample>
, SamplingRateAccessor
, SoundSampleReader
, org.refcodes.io.RowReader<SoundSample>
, org.refcodes.mixin.IndexAccessor
public class CsvSoundSampleReader extends AbstractCsvSampleReader<SoundSample> implements SoundSampleReader
CsvSoundSampleReader
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 |
---|---|---|
|
CsvSoundSampleReader(File aFile) |
Constructs the
CsvSoundSampleReader for writing sound samples to
a CSV file or stream. |
|
CsvSoundSampleReader(InputStream aInputStream) |
Constructs the
CsvSoundSampleReader for writing sound samples to
a CSV file or stream. |
protected |
CsvSoundSampleReader(org.refcodes.tabular.CsvStringRecordReader aCsvReader) |
Constructs the
CsvSoundSampleReader 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.
|
SoundSample |
readNext() |
|
double[] |
readNextSampleData() |
Reads the next samples, one sample for each channel.
|
close, doProbeHeader, hasNext
close
public CsvSoundSampleReader(File aFile) throws ZipException, IOException
CsvSoundSampleReader
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 CsvSoundSampleReader(InputStream aInputStream) throws IOException
CsvSoundSampleReader
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 CsvSoundSampleReader(org.refcodes.tabular.CsvStringRecordReader aCsvReader)
CsvSoundSampleReader
for writing sound samples to
a CSV file or stream.aCsvReader
- The CsvStringRecordReader
with which to write
the CSV records with.public SoundSample readNext() throws IOException
readNext
in interface org.refcodes.io.RowReader<SoundSample>
IOException
public double[] readNextSampleData() throws IOException
readNextSampleData
in interface SoundSampleReader
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.