30) : mLeft{ left }, mpRight{ pRight }, mPollUser{ move(pollUser) }
31 , mPos{ start }, mOutputRemaining{ len }
78 assert(result <= bound);
82 assert(bound == 0 ||
Remaining() == 0 || result > 0);
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Accumulates (non-interleaved) data during effect processing.
float & GetWritePosition(unsigned iChannel)
Get writable position for one channel.
unsigned Channels() const
bool GetFloats(float *buffer, sampleCount start, size_t len, fillFormat fill=fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const
Retrieve samples from a track in floating-point format, regardless of the storage format.
SampleTrackSource(const SampleTrack &left, const SampleTrack *pRight, sampleCount start, sampleCount len, Poller pollUser)
std::optional< size_t > Acquire(Buffers &data, size_t bound) override
Occupy vacant space in Buffers with some data.
const SampleTrack & mLeft
bool Release() override
Can test for user cancellation.
sampleCount mOutputRemaining
std::function< bool(sampleCount blockSize)> Poller
Type of function returning false if user cancels progress.
const SampleTrack *const mpRight
bool AcceptsBuffers(const Buffers &buffers) const override
bool AcceptsBlockSize(size_t blockSize) const override
Always true.
~SampleTrackSource() override
sampleCount Remaining() const override
Result includes any amount Acquired and not yet Released.
Positions or offsets within audio files need a wide type.