|
OpenWareLaboratory
|

Public Member Functions | |
| CircularBuffer () | |
| CircularBuffer (DataType *data, IndexType size) | |
| void | clear () |
| void | delay (DataType *in, DataType *out, IndexType len, int delay_samples) |
| Write to buffer and read with a delay. More... | |
| IndexType | getContiguousReadCapacity () const |
| IndexType | getContiguousWriteCapacity () const |
| DataType * | getData () |
| IndexType | getDelay () const |
| Get the read index expressed as delay behind the write index. More... | |
| IndexType | getReadCapacity () const |
| DataType * | getReadHead () |
| IndexType | getReadIndex () |
| IndexType | getSize () const |
| IndexType | getWriteCapacity () const |
| DataType * | getWriteHead () |
| IndexType | getWriteIndex () |
| bool | isEmpty () const |
| bool | isFull () const |
| void | moveReadHead (int32_t samples) |
| void | moveWriteHead (int32_t samples) |
| void | overdub (DataType c) |
| void | overdubAt (IndexType index, DataType value) |
| DataType | read () |
| void | read (DataType *dst, IndexType len) |
| DataType | readAt (IndexType index) |
| void | reset () |
| void | setAll (const DataType value) |
| void | setData (DataType *data, IndexType len) |
| void | setDelay (int samples) |
| Set the read index. More... | |
| void | setReadIndex (IndexType pos) |
| void | setWriteIndex (IndexType pos) |
| void | skipUntilLast (char c) |
| void | write (DataType *source, IndexType len) |
| void | write (DataType c) |
| void | writeAt (IndexType index, DataType value) |
Static Public Member Functions | |
| static CircularBuffer< DataType > * | create (IndexType len) |
| static void | destroy (CircularBuffer< DataType > *obj) |
Protected Attributes | |
| DataType * | data |
| bool | empty = true |
| IndexType | readpos = 0 |
| IndexType | size |
| IndexType | writepos = 0 |
Definition at line 12 of file CircularBuffer.h.
|
inline |
Definition at line 20 of file CircularBuffer.h.
|
inline |
Definition at line 21 of file CircularBuffer.h.
|
inline |
Definition at line 220 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::setAll().
Referenced by DelayProcessor::clear(), CrossFadingDelayProcessor::clear(), CircularBuffer< DataType, IndexType >::create(), InterpolatingCircularFloatBuffer< im >::create(), and CrossFadingCircularBuffer< T >::create().
|
inlinestatic |
Definition at line 224 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::clear().
|
inline |
Write to buffer and read with a delay.
Definition at line 182 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::read(), CircularBuffer< DataType, IndexType >::setDelay(), and CircularBuffer< DataType, IndexType >::write().
Referenced by DelayProcessor::process().
|
inlinestatic |
Definition at line 230 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data.
|
inline |
Definition at line 203 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 196 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 32 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data.
Referenced by DelayProcessor::destroy(), and InterpolatingWavetableOscillator< im >::getWavetable().
|
inline |
Get the read index expressed as delay behind the write index.
Definition at line 175 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 188 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::getWriteCapacity(), and CircularBuffer< DataType, IndexType >::size.
Referenced by CircularBuffer< DataType, IndexType >::moveReadHead(), and CircularBuffer< DataType, IndexType >::read().
|
inline |
Definition at line 155 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, and CircularBuffer< DataType, IndexType >::readpos.
Referenced by CircularBuffer< DataType, IndexType >::read(), and CircularBuffer< DataType, IndexType >::skipUntilLast().
|
inline |
Definition at line 147 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::readpos.
|
inline |
Definition at line 28 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::size.
Referenced by InterpolatingWavetableOscillator< im >::getSample(), and InterpolatingWavetableOscillator< im >::getWavetable().
|
inline |
Definition at line 192 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::empty, CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
Referenced by CircularBuffer< DataType, IndexType >::getReadCapacity(), CircularBuffer< DataType, IndexType >::moveWriteHead(), and CircularBuffer< DataType, IndexType >::write().
|
inline |
Definition at line 137 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, and CircularBuffer< DataType, IndexType >::writepos.
Referenced by CircularBuffer< DataType, IndexType >::write().
|
inline |
Definition at line 129 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 36 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::empty.
|
inline |
Definition at line 40 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::empty, CircularBuffer< DataType, IndexType >::readpos, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 159 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::empty, FLOW_ASSERT, CircularBuffer< DataType, IndexType >::getReadCapacity(), CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
|
inline |
Definition at line 71 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, CircularBuffer< DataType, IndexType >::empty, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 78 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, and CircularBuffer< DataType, IndexType >::size.
|
inline |
Definition at line 82 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, CircularBuffer< DataType, IndexType >::empty, FLOW_ASSERT, CircularBuffer< DataType, IndexType >::getReadCapacity(), CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
Referenced by CircularBuffer< DataType, IndexType >::delay(), CrossFadingCircularBuffer< T >::delay(), and DelayProcessor::process().
|
inline |
Definition at line 91 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, CircularBuffer< DataType, IndexType >::empty, FLOW_ASSERT, CircularBuffer< DataType, IndexType >::getReadCapacity(), CircularBuffer< DataType, IndexType >::getReadHead(), CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 106 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, and CircularBuffer< DataType, IndexType >::size.
|
inline |
Definition at line 215 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::empty, CircularBuffer< DataType, IndexType >::readpos, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 210 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, and CircularBuffer< DataType, IndexType >::size.
Referenced by CircularBuffer< DataType, IndexType >::clear(), and InterpolatingSignalGenerator< im >::set().
|
inline |
Definition at line 23 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, and CircularBuffer< DataType, IndexType >::size.
Referenced by InterpolatingWavetableOscillator< im >::setWavetable().
|
inline |
Set the read index.
| samples | behind the write index. |
Definition at line 168 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
Referenced by CircularBuffer< DataType, IndexType >::delay(), CrossFadingCircularBuffer< T >::delay(), and DelayProcessor::setDelay().
|
inline |
Definition at line 151 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::readpos, and CircularBuffer< DataType, IndexType >::size.
|
inline |
Definition at line 133 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 110 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, CircularBuffer< DataType, IndexType >::empty, CircularBuffer< DataType, IndexType >::getReadHead(), CircularBuffer< DataType, IndexType >::readpos, CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 52 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, CircularBuffer< DataType, IndexType >::empty, FLOW_ASSERT, CircularBuffer< DataType, IndexType >::getWriteCapacity(), CircularBuffer< DataType, IndexType >::getWriteHead(), CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
|
inline |
Definition at line 44 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, CircularBuffer< DataType, IndexType >::empty, FLOW_ASSERT, CircularBuffer< DataType, IndexType >::getWriteCapacity(), CircularBuffer< DataType, IndexType >::size, and CircularBuffer< DataType, IndexType >::writepos.
Referenced by CircularBuffer< DataType, IndexType >::delay(), CrossFadingCircularBuffer< T >::delay(), DelayProcessor::process(), and InterpolatingSignalGenerator< im >::update().
|
inline |
Definition at line 67 of file CircularBuffer.h.
References CircularBuffer< DataType, IndexType >::data, and CircularBuffer< DataType, IndexType >::size.
|
protected |
Definition at line 14 of file CircularBuffer.h.
Referenced by CircularBuffer< DataType, IndexType >::destroy(), CrossFadingCircularBuffer< T >::destroy(), InterpolatingCircularFloatBuffer< im >::destroy(), CircularBuffer< DataType, IndexType >::getData(), CircularBuffer< DataType, IndexType >::getReadHead(), CircularBuffer< DataType, IndexType >::getWriteHead(), CircularBuffer< DataType, IndexType >::overdub(), CircularBuffer< DataType, IndexType >::overdubAt(), CircularBuffer< DataType, IndexType >::read(), CircularBuffer< DataType, IndexType >::readAt(), CircularBuffer< DataType, IndexType >::setAll(), CircularBuffer< DataType, IndexType >::setData(), CircularBuffer< DataType, IndexType >::skipUntilLast(), CircularBuffer< DataType, IndexType >::write(), and CircularBuffer< DataType, IndexType >::writeAt().
|
protected |
Definition at line 18 of file CircularBuffer.h.
Referenced by CircularBuffer< DataType, IndexType >::getWriteCapacity(), CircularBuffer< DataType, IndexType >::isEmpty(), CircularBuffer< DataType, IndexType >::isFull(), CircularBuffer< DataType, IndexType >::moveReadHead(), CircularBuffer< DataType, IndexType >::moveWriteHead(), CircularBuffer< DataType, IndexType >::overdub(), CircularBuffer< DataType, IndexType >::read(), CircularBuffer< DataType, IndexType >::reset(), CircularBuffer< DataType, IndexType >::skipUntilLast(), and CircularBuffer< DataType, IndexType >::write().
|
protected |
Definition at line 17 of file CircularBuffer.h.
Referenced by CircularBuffer< DataType, IndexType >::getContiguousReadCapacity(), CircularBuffer< DataType, IndexType >::getContiguousWriteCapacity(), CircularBuffer< DataType, IndexType >::getDelay(), CircularBuffer< DataType, IndexType >::getReadHead(), CircularBuffer< DataType, IndexType >::getReadIndex(), CircularBuffer< DataType, IndexType >::getWriteCapacity(), CircularBuffer< DataType, IndexType >::isFull(), CircularBuffer< DataType, IndexType >::moveReadHead(), CircularBuffer< DataType, IndexType >::read(), CircularBuffer< DataType, IndexType >::reset(), CircularBuffer< DataType, IndexType >::setDelay(), CircularBuffer< DataType, IndexType >::setReadIndex(), and CircularBuffer< DataType, IndexType >::skipUntilLast().
|
protected |
Definition at line 15 of file CircularBuffer.h.
Referenced by CircularBuffer< DataType, IndexType >::getContiguousReadCapacity(), CircularBuffer< DataType, IndexType >::getContiguousWriteCapacity(), CircularBuffer< DataType, IndexType >::getDelay(), CircularBuffer< DataType, IndexType >::getReadCapacity(), CircularBuffer< DataType, IndexType >::getSize(), CircularBuffer< DataType, IndexType >::getWriteCapacity(), CircularBuffer< DataType, IndexType >::moveReadHead(), CircularBuffer< DataType, IndexType >::moveWriteHead(), CircularBuffer< DataType, IndexType >::overdub(), CircularBuffer< DataType, IndexType >::overdubAt(), CircularBuffer< DataType, IndexType >::read(), CircularBuffer< DataType, IndexType >::readAt(), CircularBuffer< DataType, IndexType >::setAll(), CircularBuffer< DataType, IndexType >::setData(), CircularBuffer< DataType, IndexType >::setDelay(), CircularBuffer< DataType, IndexType >::setReadIndex(), CircularBuffer< DataType, IndexType >::setWriteIndex(), CircularBuffer< DataType, IndexType >::skipUntilLast(), CircularBuffer< DataType, IndexType >::write(), and CircularBuffer< DataType, IndexType >::writeAt().
|
protected |
Definition at line 16 of file CircularBuffer.h.
Referenced by CircularBuffer< DataType, IndexType >::getContiguousReadCapacity(), CircularBuffer< DataType, IndexType >::getContiguousWriteCapacity(), CircularBuffer< DataType, IndexType >::getDelay(), CircularBuffer< DataType, IndexType >::getWriteCapacity(), CircularBuffer< DataType, IndexType >::getWriteHead(), CircularBuffer< DataType, IndexType >::getWriteIndex(), CircularBuffer< DataType, IndexType >::isFull(), CircularBuffer< DataType, IndexType >::moveReadHead(), CircularBuffer< DataType, IndexType >::moveWriteHead(), CircularBuffer< DataType, IndexType >::overdub(), CircularBuffer< DataType, IndexType >::read(), CircularBuffer< DataType, IndexType >::reset(), CircularBuffer< DataType, IndexType >::setDelay(), CircularBuffer< DataType, IndexType >::setWriteIndex(), CircularBuffer< DataType, IndexType >::skipUntilLast(), and CircularBuffer< DataType, IndexType >::write().