Interface MonoSampleBuilder

All Superinterfaces:
org.refcodes.mixin.IndexAccessor, org.refcodes.mixin.IndexAccessor.IndexBuilder<MonoSampleBuilder>, org.refcodes.mixin.IndexAccessor.IndexMutator, org.refcodes.mixin.IndexAccessor.IndexProperty, MonoSample, SampleBuilder<MonoSample,MonoSampleBuilder>, SamplingRateAccessor, SamplingRateAccessor.SamplingRateBuilder<MonoSampleBuilder>, SamplingRateAccessor.SamplingRateMutator, SamplingRateAccessor.SamplingRateProperty, SoundSample, org.refcodes.mixin.TimeStampAccessor, org.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<MonoSampleBuilder>, org.refcodes.mixin.TimeStampAccessor.TimeStampMutator, org.refcodes.mixin.TimeStampAccessor.TimeStampProperty
All Known Implementing Classes:
MonoSampleBuilderImpl

public interface MonoSampleBuilder extends MonoSample, SampleBuilder<MonoSample,MonoSampleBuilder>
The MonoSampleBuilder extends the SoundSample with builder functionality.
  • Method Details

    • setMonoData

      void setMonoData(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.
    • withMonoData

      default MonoSampleBuilder withMonoData(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 aTimeMillis)
      Sets the position in time of this sound sample in ms.
      Specified by:
      setTimeStamp in interface org.refcodes.mixin.TimeStampAccessor.TimeStampMutator
      Parameters:
      aTimeMillis - The sound sample's time positioning in ms.
    • withTimeStamp

      default MonoSampleBuilder withTimeStamp(double aTimeMillis)
      Sets the position in time of this sound sample in ms.
      Specified by:
      withTimeStamp in interface org.refcodes.mixin.TimeStampAccessor.TimeStampBuilder<MonoSampleBuilder>
      Parameters:
      aTimeMillis - The sound sample's time positioning in ms.
      Returns:
      The builder for applying multiple build operations.
    • withIndex

      default MonoSampleBuilder withIndex(long aIndex)
      Specified by:
      withIndex in interface org.refcodes.mixin.IndexAccessor.IndexBuilder<MonoSampleBuilder>
    • withIncreaseIndex

      default MonoSampleBuilder withIncreaseIndex()
      Specified by:
      withIncreaseIndex in interface org.refcodes.mixin.IndexAccessor.IndexBuilder<MonoSampleBuilder>
    • withDecreaseIndex

      default MonoSampleBuilder withDecreaseIndex()
      Specified by:
      withDecreaseIndex in interface org.refcodes.mixin.IndexAccessor.IndexBuilder<MonoSampleBuilder>
    • withSamplingRate

      default MonoSampleBuilder withSamplingRate(int aSamplingRate)
      Sets the sampling rate for the sampling rate property.
      Specified by:
      withSamplingRate in interface SamplingRateAccessor.SamplingRateBuilder<MonoSampleBuilder>
      Parameters:
      aSamplingRate - The sampling rate to be stored by the sampling rate property.
      Returns:
      The builder for applying multiple build operations.
    • build

      static MonoSampleBuilder 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 MonoSampleBuilder.