Audacity 3.2.0
|
#include <CircularSampleBuffer.h>
Public Member Functions | |
CircularSampleBuffer () | |
~CircularSampleBuffer () | |
void | setSize (int n) |
int | getAllocatedSize () const |
void | reset () |
void | write (int offset, const SampleT &sample) |
void | writeOffset0 (const SampleT &sample) |
const SampleT & | read (int offset) const |
void | advance (int n) |
change the 0 position by n More... | |
void | writeBlock (int startOffset, int n, const SampleT *sourceBlock) |
void | readBlockWithGain (int startOffset, int n, SampleT *targetBlock, float gainFactor) const |
void | readAddBlockWithGain (int startOffset, int n, SampleT *targetBlock, float gainFactor) const |
void | writeAddBlockWithGain (int startOffset, int n, const SampleT *sourceBlock, float gainFactor) |
void | readBlock (int startOffset, int n, SampleT *targetBlock) const |
void | readAndClearBlock (int startOffset, int n, SampleT *targetBlock) |
void | clearBlock (int startOffset, int n) |
Private Member Functions | |
template<typename fnc > | |
void | _splitBlockOffsetFunction (int startOffset, int n, fnc f) const |
Private Attributes | |
SampleT * | _buffer = nullptr |
int | _position0 = 0 |
int | _allocatedSize = 0 |
int | _bufferSizeMask = 0 |
Definition at line 16 of file CircularSampleBuffer.h.
|
inline |
Definition at line 19 of file CircularSampleBuffer.h.
|
inline |
Definition at line 23 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, and staffpad::vo::free().
|
inlineprivate |
Definition at line 88 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_allocatedSize, staffpad::audio::CircularSampleBuffer< SampleT >::_bufferSizeMask, and staffpad::audio::CircularSampleBuffer< SampleT >::_position0.
Referenced by staffpad::audio::CircularSampleBuffer< SampleT >::clearBlock(), staffpad::audio::CircularSampleBuffer< SampleT >::readAddBlockWithGain(), staffpad::audio::CircularSampleBuffer< SampleT >::readAndClearBlock(), staffpad::audio::CircularSampleBuffer< SampleT >::readBlock(), staffpad::audio::CircularSampleBuffer< SampleT >::readBlockWithGain(), staffpad::audio::CircularSampleBuffer< SampleT >::writeAddBlockWithGain(), and staffpad::audio::CircularSampleBuffer< SampleT >::writeBlock().
|
inline |
change the 0 position by n
Definition at line 80 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_bufferSizeMask, and staffpad::audio::CircularSampleBuffer< SampleT >::_position0.
|
inline |
Definition at line 148 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), and staffpad::vo::setToZero().
|
inline |
Definition at line 52 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_allocatedSize.
|
inline |
|
inline |
Definition at line 119 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), and staffpad::vo::constantMultiplyAndAdd().
|
inline |
Definition at line 140 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), staffpad::vo::copy(), and staffpad::vo::setToZero().
|
inline |
Definition at line 133 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), and staffpad::vo::copy().
|
inline |
Definition at line 112 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), and staffpad::vo::constantMultiply().
|
inline |
Definition at line 57 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_allocatedSize, staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, and staffpad::audio::CircularSampleBuffer< SampleT >::_position0.
|
inline |
Definition at line 29 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_allocatedSize, staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, and staffpad::audio::CircularSampleBuffer< SampleT >::_bufferSizeMask.
|
inline |
|
inline |
Definition at line 126 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), and staffpad::vo::constantMultiplyAndAdd().
|
inline |
Definition at line 105 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), and staffpad::vo::copy().
|
inline |
Definition at line 69 of file CircularSampleBuffer.h.
References staffpad::audio::CircularSampleBuffer< SampleT >::_buffer, and staffpad::audio::CircularSampleBuffer< SampleT >::_position0.
|
private |
Definition at line 158 of file CircularSampleBuffer.h.
Referenced by staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), staffpad::audio::CircularSampleBuffer< SampleT >::getAllocatedSize(), staffpad::audio::CircularSampleBuffer< SampleT >::reset(), and staffpad::audio::CircularSampleBuffer< SampleT >::setSize().
|
private |
Definition at line 155 of file CircularSampleBuffer.h.
Referenced by staffpad::audio::CircularSampleBuffer< SampleT >::clearBlock(), staffpad::audio::CircularSampleBuffer< SampleT >::read(), staffpad::audio::CircularSampleBuffer< SampleT >::readAddBlockWithGain(), staffpad::audio::CircularSampleBuffer< SampleT >::readAndClearBlock(), staffpad::audio::CircularSampleBuffer< SampleT >::readBlock(), staffpad::audio::CircularSampleBuffer< SampleT >::readBlockWithGain(), staffpad::audio::CircularSampleBuffer< SampleT >::reset(), staffpad::audio::CircularSampleBuffer< SampleT >::setSize(), staffpad::audio::CircularSampleBuffer< SampleT >::write(), staffpad::audio::CircularSampleBuffer< SampleT >::writeAddBlockWithGain(), staffpad::audio::CircularSampleBuffer< SampleT >::writeBlock(), staffpad::audio::CircularSampleBuffer< SampleT >::writeOffset0(), and staffpad::audio::CircularSampleBuffer< SampleT >::~CircularSampleBuffer().
|
private |
Definition at line 159 of file CircularSampleBuffer.h.
Referenced by staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), staffpad::audio::CircularSampleBuffer< SampleT >::advance(), staffpad::audio::CircularSampleBuffer< SampleT >::read(), staffpad::audio::CircularSampleBuffer< SampleT >::setSize(), and staffpad::audio::CircularSampleBuffer< SampleT >::write().
|
private |
Definition at line 157 of file CircularSampleBuffer.h.
Referenced by staffpad::audio::CircularSampleBuffer< SampleT >::_splitBlockOffsetFunction(), staffpad::audio::CircularSampleBuffer< SampleT >::advance(), staffpad::audio::CircularSampleBuffer< SampleT >::read(), staffpad::audio::CircularSampleBuffer< SampleT >::reset(), staffpad::audio::CircularSampleBuffer< SampleT >::write(), and staffpad::audio::CircularSampleBuffer< SampleT >::writeOffset0().