The CircularBuffer object implements a simple circular buffer. It uses a wrap mask to wrap the read or write index quickly.
More...
#include <fxobjects.h>
template<typename T>
class CircularBuffer< T >
The CircularBuffer object implements a simple circular buffer. It uses a wrap mask to wrap the read or write index quickly.
A simple cyclic buffer: NOTE - this is NOT an IAudioSignalProcessor or IAudioSignalGenerator S must be a power of 2.
- Author
- Will Pirkle http://www.willpirkle.com
- Version
- Revision : 1.0
- Date
- Date : 2018 / 09 / 7
◆ createCircularBuffer()
template<typename T >
void CircularBuffer< T >::createCircularBuffer |
( |
unsigned int |
_bufferLength | ) |
|
|
inline |
Create a buffer based on a target maximum in SAMPLES do NOT call from realtime audio thread; do this prior to any processing
◆ createCircularBufferPowerOfTwo()
template<typename T >
void CircularBuffer< T >::createCircularBufferPowerOfTwo |
( |
unsigned int |
_bufferLengthPowerOfTwo | ) |
|
|
inline |
Create a buffer based on a target maximum in SAMPLESwhere the size is pre-calculated as a power of two
◆ flushBuffer()
flush buffer by resetting all values to 0.0
◆ readBuffer() [1/2]
read an arbitrary location that includes a fractional sample
◆ readBuffer() [2/2]
read an arbitrary location that is delayInSamples old
◆ setInterpolate()
enable or disable interpolation; usually used for diagnostics or in algorithms that require strict integer samples times
◆ writeBuffer()
write a value into the buffer; this overwrites the previous oldest value in the buffer
The documentation for this class was generated from the following file: