12#ifndef __AUDACITY_AUDIO_GRAPH_BUFFERS__
13#define __AUDACITY_AUDIO_GRAPH_BUFFERS__
38 explicit Buffers(
size_t blockSize = 512);
48 Buffers(
unsigned nChannels,
size_t blockSize,
size_t nBlocks,
50 unsigned Channels()
const {
return mBuffers.size(); }
54 return mBuffers.empty() ? 0
56 -
reinterpret_cast<const float*
>(GetReadPosition(0));
69 void Reinit(
unsigned nChannels,
size_t blockSize,
size_t nBlocks,
72 float *
const *
Positions()
const {
return mPositions.data(); }
80 void Discard(
size_t drop,
size_t keep);
86 void Advance(
size_t count);
113 float &GetWritePosition(
unsigned iChannel);
117 void ClearBuffer(
unsigned iChannel,
size_t n);
121 size_t mBufferSize{ 0 };
122 size_t mBlockSize{ 0 };
Accumulates (non-interleaved) data during effect processing.
size_t BufferSize() const
std::vector< std::vector< float > > mBuffers
unsigned Channels() const
float *const * Positions() const
Get array of positions in the buffers.
std::vector< float * > mPositions