Interface SampleBufferType

All Superinterfaces:
SampleBufferReadableType
All Known Implementing Classes:
SampleBufferDouble, SampleBufferFloat

public interface SampleBufferType extends SampleBufferReadableType

A readable and writable sample buffer.

All methods that take sample/frame indices as arguments throw com.io7m.jranges.RangeCheckException exceptions if the indices are out of range.

  • Method Details

    • frameSetAll

      void frameSetAll(long index, double value)
      Set the value of frame index. If the underlying buffer contains more than one channel, then the given value is inserted into all channels in the frame.
      Parameters:
      index - The frame index
      value - The input
    • frameSetExact

      void frameSetExact(long index, double c0) throws IllegalArgumentException
      Set the value of frame index.
      Parameters:
      index - The frame index
      c0 - The input for channel 0
      Throws:
      IllegalArgumentException - If channels() != 1
    • frameSetExact

      void frameSetExact(long index, double c0, double c1) throws IllegalArgumentException
      Set the value of frame index.
      Parameters:
      index - The frame index
      c0 - The input for channel 0
      c1 - The input for channel 1
      Throws:
      IllegalArgumentException - If channels() != 2
    • frameSetExact

      void frameSetExact(long index, double[] value) throws IllegalArgumentException
      Set the value of frame index. The input value is assumed to contain one sample for each of the channels in the frame.
      Parameters:
      index - The frame index
      value - The input
      Throws:
      IllegalArgumentException - If value.length != channels()