Package com.io7m.jsamplebuffer.api
Interface SampleBufferType
- All Superinterfaces:
SampleBufferReadableType
- All Known Implementing Classes:
SampleBufferDouble,SampleBufferFloat
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 Summary
Modifier and TypeMethodDescriptionvoidframeSetAll(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 Details
-
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
Set the value of frameindex.- Parameters:
index- The frame indexc0- The input for channel 0- Throws:
IllegalArgumentException- Ifchannels() != 1
-
frameSetExact
Set the value of frameindex.- Parameters:
index- The frame indexc0- The input for channel 0c1- The input for channel 1- Throws:
IllegalArgumentException- Ifchannels() != 2
-
frameSetExact
Set 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:
IllegalArgumentException- Ifvalue.length != channels()
-