-
- All Superinterfaces:
org.refcodes.mixin.IndexAccessor,org.refcodes.mixin.IndexAccessor.IndexBuilder<SoundSampleBuilder>,org.refcodes.mixin.IndexAccessor.IndexMutator,org.refcodes.mixin.IndexAccessor.IndexProperty,SampleBuilder<SoundSample,SoundSampleBuilder>,SamplingRateAccessor,SamplingRateAccessor.SamplingRateBuilder<SoundSampleBuilder>,SamplingRateAccessor.SamplingRateMutator,SamplingRateAccessor.SamplingRateProperty,SoundSample,org.refcodes.mixin.TimeStampAccessor,org.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<SoundSampleBuilder>,org.refcodes.mixin.TimeStampAccessor.TimeStampMutator,org.refcodes.mixin.TimeStampAccessor.TimeStampProperty
- All Known Implementing Classes:
SoundSampleBuilderImpl
public interface SoundSampleBuilder extends SoundSample, SampleBuilder<SoundSample,SoundSampleBuilder>
TheSoundSampleBuilderextends theSoundSamplewith builder functionality.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.IndexAccessor
org.refcodes.mixin.IndexAccessor.IndexBuilder<B extends org.refcodes.mixin.IndexAccessor.IndexBuilder<B>>, org.refcodes.mixin.IndexAccessor.IndexMutator, org.refcodes.mixin.IndexAccessor.IndexProperty
-
Nested classes/interfaces inherited from interface org.refcodes.audio.SamplingRateAccessor
SamplingRateAccessor.SamplingRateBuilder<B extends SamplingRateAccessor.SamplingRateBuilder<B>>, SamplingRateAccessor.SamplingRateMutator, SamplingRateAccessor.SamplingRateProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.TimeStampAccessor
org.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<B extends org.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<B>>, org.refcodes.mixin.TimeStampAccessor.TimeStampMutator, org.refcodes.mixin.TimeStampAccessor.TimeStampProperty
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static SoundSampleBuilderbuild(double[] aSample)This is a convenience method for easily instantiating the according builder.voidsetSampleData(double[] aSampleData)Sets the sample's data for the according time positioning.voidsetTimeStamp(double aTimeInMillis)Sets the position in time of this sound sample in ms.default SoundSampleBuilderwithDecreaseIndex()default SoundSampleBuilderwithIncreaseIndex()default SoundSampleBuilderwithIndex(long aIndex)default SoundSampleBuilderwithSampleData(double[] aSampleData)Sets the sample's data for the sample property.default SoundSampleBuilderwithSamplingRate(int aSamplingRate)Sets the sampling rate for the sampling rate property.default SoundSampleBuilderwithTimeStamp(double aTimeInMillis)Sets the position in time of this sound sample in ms.-
Methods inherited from interface org.refcodes.mixin.IndexAccessor.IndexMutator
decreaseIndex, increaseIndex, resetIndex, setIndex
-
Methods inherited from interface org.refcodes.audio.SampleBuilder
updateTimeStamp
-
Methods inherited from interface org.refcodes.audio.SamplingRateAccessor
getSamplingRate
-
Methods inherited from interface org.refcodes.audio.SamplingRateAccessor.SamplingRateMutator
setSamplingRate
-
Methods inherited from interface org.refcodes.audio.SamplingRateAccessor.SamplingRateProperty
letSamplingRate
-
Methods inherited from interface org.refcodes.audio.SoundSample
getChannelCount, getSampleData, getTimeStamp
-
-
-
-
Method Detail
-
setSampleData
void setSampleData(double[] aSampleData)
Sets the sample's data for the according time positioning. A sample is a value or set of values at a point in time. In case of mono audio, a sample represents a single value, in case of stereo audio, a sample represents a set of values, one value represents one channel (e.g. two channels when we have a left and a right speaker).- Parameters:
aSampleData- The sample's data for the according time positioning.
-
withSampleData
default SoundSampleBuilder withSampleData(double[] aSampleData)
Sets the sample's data for the sample property.- Parameters:
aSampleData- The sample's data to be stored by the sample property.- Returns:
- The builder for applying multiple build operations.
-
setTimeStamp
void setTimeStamp(double aTimeInMillis)
Sets the position in time of this sound sample in ms.- Specified by:
setTimeStampin interfaceorg.refcodes.mixin.TimeStampAccessor.TimeStampMutator- Parameters:
aTimeInMillis- The sound sample's time positioning in ms.
-
withTimeStamp
default SoundSampleBuilder withTimeStamp(double aTimeInMillis)
Sets the position in time of this sound sample in ms.- Specified by:
withTimeStampin interfaceorg.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<SoundSampleBuilder>- Parameters:
aTimeInMillis- The sound sample's time positioning in ms.- Returns:
- The builder for applying multiple build operations.
-
withIndex
default SoundSampleBuilder withIndex(long aIndex)
- Specified by:
withIndexin interfaceorg.refcodes.mixin.IndexAccessor.IndexBuilder<SoundSampleBuilder>
-
withIncreaseIndex
default SoundSampleBuilder withIncreaseIndex()
- Specified by:
withIncreaseIndexin interfaceorg.refcodes.mixin.IndexAccessor.IndexBuilder<SoundSampleBuilder>
-
withDecreaseIndex
default SoundSampleBuilder withDecreaseIndex()
- Specified by:
withDecreaseIndexin interfaceorg.refcodes.mixin.IndexAccessor.IndexBuilder<SoundSampleBuilder>
-
withSamplingRate
default SoundSampleBuilder withSamplingRate(int aSamplingRate)
Sets the sampling rate for the sampling rate property.- Specified by:
withSamplingRatein interfaceSamplingRateAccessor.SamplingRateBuilder<SoundSampleBuilder>- Parameters:
aSamplingRate- The sampling rate to be stored by the sampling rate property.- Returns:
- The builder for applying multiple build operations.
-
build
static SoundSampleBuilder build(double[] aSample)
This is a convenience method for easily instantiating the according builder.- Parameters:
aSample- The sample (set of values representing the channels, one channel per value) for the related time positioning.- Returns:
- The according
SoundSampleBuilder.
-
-