27) : mSequence{ sequence }, mnChannels{ nChannels }, mPollUser{ move(pollUser) }
28 , mPos{ start }, mOutputRemaining{ len }
30 assert(nChannels <= sequence.
NChannels());
50#define stackAllocate(T, count) static_cast<T*>(alloca(count * sizeof(T)))
81 assert(result <= bound);
85 assert(bound == 0 ||
Remaining() == 0 || result > 0);
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
#define stackAllocate(T, count)
Accumulates (non-interleaved) data during effect processing.
float & GetWritePosition(unsigned iChannel)
Get writable position for one channel.
unsigned Channels() const
bool GetFloats(size_t iChannel, size_t nBuffers, float *const buffers[], sampleCount start, size_t len, bool backwards=false, fillFormat fill=FillFormat::fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const
virtual size_t NChannels() const =0
A constant property.
const WideSampleSequence & mSequence
bool AcceptsBlockSize(size_t blockSize) const override
Always true.
~WideSampleSource() override
std::optional< size_t > Acquire(Buffers &data, size_t bound) override
Occupy vacant space in Buffers with some data.
bool AcceptsBuffers(const Buffers &buffers) const override
sampleCount mOutputRemaining
std::function< bool(sampleCount blockSize)> Poller
Type of function returning false if user cancels progress.
bool Release() override
Can test for user cancellation.
sampleCount Remaining() const override
Result includes any amount Acquired and not yet Released.
WideSampleSource(const WideSampleSequence &sequence, size_t nChannels, sampleCount start, sampleCount len, Poller pollUser)
Positions or offsets within audio files need a wide type.