Package com.io7m.jsamplebuffer.api
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 throwcom.io7m.jranges.RangeCheckExceptionexceptions if the indices are out of range.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidframeSetAll(long index, double value)Set the value of frameindex.voidframeSetExact(long index, double c0)Set the value of frameindex.voidframeSetExact(long index, double[] value)Set the value of frameindex.voidframeSetExact(long index, double c0, double c1)Set the value of frameindex.-
Methods inherited from interface com.io7m.jsamplebuffer.api.SampleBufferReadableType
channels, frameGetExact, frameGetExact, frames, sampleRate, samples
-
-
-
-
Method Detail
-
frameSetAll
void frameSetAll(long index, double value)Set the value of frameindex. 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 indexvalue- The input
-
frameSetExact
void frameSetExact(long index, double c0) throws java.lang.IllegalArgumentExceptionSet the value of frameindex.- Parameters:
index- The frame indexc0- The input for channel 0- Throws:
java.lang.IllegalArgumentException- Ifchannels() != 1
-
frameSetExact
void frameSetExact(long index, double c0, double c1) throws java.lang.IllegalArgumentExceptionSet the value of frameindex.- Parameters:
index- The frame indexc0- The input for channel 0c1- The input for channel 1- Throws:
java.lang.IllegalArgumentException- Ifchannels() != 2
-
frameSetExact
void frameSetExact(long index, double[] value) throws java.lang.IllegalArgumentExceptionSet the value of frameindex. The input value is assumed to contain one sample for each of the channels in the frame.- Parameters:
index- The frame indexvalue- The input- Throws:
java.lang.IllegalArgumentException- Ifvalue.length != channels()
-
-