SampleBuilder<SoundSample,SoundSampleBuilder>
, SamplingRateAccessor
, SamplingRateAccessor.SamplingRateBuilder<SoundSample>
, SamplingRateAccessor.SamplingRateMutator
, SamplingRateAccessor.SamplingRateProperty
, SoundSample
, SoundSampleBuilder
, org.refcodes.mixin.IndexAccessor
, org.refcodes.mixin.IndexAccessor.IndexBuilder<SoundSample>
, org.refcodes.mixin.IndexAccessor.IndexMutator
, org.refcodes.mixin.IndexAccessor.IndexProperty
, org.refcodes.mixin.TimeStampAccessor
, org.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<SoundSample>
, org.refcodes.mixin.TimeStampAccessor.TimeStampMutator
, org.refcodes.mixin.TimeStampAccessor.TimeStampProperty
public class SoundSampleBuilderImpl extends Object implements SoundSampleBuilder
SoundSampleBuilder
represents multiple amplitudes (one for each
channel,e.g. two in case we have classical stereo sound) assigned to an
according time positioning.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
org.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<B extends org.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<B>>, org.refcodes.mixin.TimeStampAccessor.TimeStampMutator, org.refcodes.mixin.TimeStampAccessor.TimeStampProperty
Constructor | Description |
---|---|
SoundSampleBuilderImpl(double[] aSampleData) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(double[] aSampleData,
int aSamplingRate) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(double aTimeMillis,
double[] aSampleData) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(double aTimeMillis,
double[] aSampleData,
int aSamplingRate) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(long aIndex,
double[] aSampleData) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(long aIndex,
double[] aSampleData,
int aSamplingRate) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(long aIndex,
double aTimeMillis,
double[] aSampleData) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(long aIndex,
double aTimeMillis,
double[] aSampleData,
int aSamplingRate) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(long aIndex,
int aSamplingRate) |
Constructs a
SoundSampleBuilder instance with the according time
and sample settings. |
SoundSampleBuilderImpl(SoundSample aSoundSample) |
Constructs a
SoundSampleImpl instance with the according sound
sample's settings |
Modifier and Type | Method | Description |
---|---|---|
void |
decreaseIndex() |
|
long |
getIndex() |
|
double[] |
getSampleData() |
Returns the sample's data for the according time positioning.
|
int |
getSamplingRate() |
Retrieves the sampling rate from the sampling rate property.
|
double |
getTimeStamp() |
Returns the position in time of this sound sample in ms.
|
void |
increaseIndex() |
|
void |
setIndex(long aIndex) |
|
void |
setSampleData(double[] aSampleData) |
Sets the sample's data for the according time positioning.
|
void |
setSamplingRate(int aSamplingRate) |
Sets the sampling rate for the sampling rate property.
|
void |
setTimeStamp(double aTimeInMillis) |
Sets the position in time of this sound sample in ms.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
updateTimeStamp
letSamplingRate
getChannelCount
build, withDecreaseIndex, withIncreaseIndex, withIndex, withSampleData, withSamplingRate, withTimeStamp
public SoundSampleBuilderImpl(SoundSample aSoundSample)
SoundSampleImpl
instance with the according sound
sample's settingsaSoundSample
- The sound sample from which to create a new instance.public SoundSampleBuilderImpl(double[] aSampleData)
SoundSampleBuilder
instance with the according time
and sample settings.aSampleData
- The sample (set of values representing the channels,
one channel per value) for the related time positioning.public SoundSampleBuilderImpl(double aTimeMillis, double[] aSampleData)
SoundSampleBuilder
instance with the according time
and sample settings.aTimeMillis
- The time positioning of this sound sample.aSampleData
- The sample (set of values representing the channels,
one channel per value) for the related time positioning.public SoundSampleBuilderImpl(double aTimeMillis, double[] aSampleData, int aSamplingRate)
SoundSampleBuilder
instance with the according time
and sample settings.aTimeMillis
- The time positioning of this sound sample.aSampleData
- The sample (set of values representing the channels,
one channel per value) for the related time positioning.aSamplingRate
- The sampling rate for the given sample.public SoundSampleBuilderImpl(double[] aSampleData, int aSamplingRate)
SoundSampleBuilder
instance with the according time
and sample settings.aSampleData
- The sample (set of values representing the channels,
one channel per value) for the related time positioning.aSamplingRate
- The sampling rate for the given sample.public SoundSampleBuilderImpl(long aIndex, double[] aSampleData)
SoundSampleBuilder
instance with the according time
and sample settings.aIndex
- The index of the sample according to its position in the
sample sequence (e.g. sound file).aSampleData
- The sample (set of values representing the channels,
one channel per value) for the related time positioning.public SoundSampleBuilderImpl(long aIndex, double[] aSampleData, int aSamplingRate)
SoundSampleBuilder
instance with the according time
and sample settings.aIndex
- The index of the sample according to its position in the
sample sequence (e.g. sound file).aSampleData
- The sample (set of values representing the channels,
one channel per value) for the related time positioning.aSamplingRate
- The sampling rate for the given sample.public SoundSampleBuilderImpl(long aIndex, double aTimeMillis, double[] aSampleData)
SoundSampleBuilder
instance with the according time
and sample settings.aIndex
- The index of the sample according to its position in the
sample sequence (e.g. sound file).aTimeMillis
- The time positioning of this sound sample.aSampleData
- The sample (set of values representing the channels,
one channel per value) for the related time positioning.public SoundSampleBuilderImpl(long aIndex, double aTimeMillis, double[] aSampleData, int aSamplingRate)
SoundSampleBuilder
instance with the according time
and sample settings.aIndex
- The index of the sample according to its position in the
sample sequence (e.g. sound file).aTimeMillis
- The time positioning of this sound sample.aSampleData
- The sample (set of values representing the channels,
one channel per value) for the related time positioning.aSamplingRate
- The sampling rate for the given sample.public SoundSampleBuilderImpl(long aIndex, int aSamplingRate)
SoundSampleBuilder
instance with the according time
and sample settings.aIndex
- The index of the sample according to its position in the
sample sequence (e.g. sound file).aSamplingRate
- The sampling rate for the given sample.public double[] getSampleData()
getSampleData
in interface SoundSample
public double getTimeStamp()
getTimeStamp
in interface SoundSample
getTimeStamp
in interface org.refcodes.mixin.TimeStampAccessor
public int getSamplingRate()
getSamplingRate
in interface SamplingRateAccessor
public long getIndex()
getIndex
in interface org.refcodes.mixin.IndexAccessor
public void setIndex(long aIndex)
setIndex
in interface org.refcodes.mixin.IndexAccessor.IndexMutator
public void increaseIndex()
increaseIndex
in interface org.refcodes.mixin.IndexAccessor.IndexMutator
public void decreaseIndex()
decreaseIndex
in interface org.refcodes.mixin.IndexAccessor.IndexMutator
public void setSampleData(double[] aSampleData)
setSampleData
in interface SoundSampleBuilder
aSampleData
- The sample's data for the according time positioning.public void setTimeStamp(double aTimeInMillis)
setTimeStamp
in interface SoundSampleBuilder
setTimeStamp
in interface org.refcodes.mixin.TimeStampAccessor.TimeStampMutator
aTimeInMillis
- The sound sample's time positioning in ms.public void setSamplingRate(int aSamplingRate)
setSamplingRate
in interface SamplingRateAccessor.SamplingRateMutator
aSamplingRate
- The sampling rate to be stored by the sampling
rate property.Copyright © 2021. All rights reserved.