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