24) : mLeft{ left }, mpRight{ pRight }
25 , mpGenerated{ pGenerated }
26 , mGenLeft{ pGenerated ? (*pGenerated->Channels().
begin()).get() : nullptr }
27 , mGenRight{ pRight && pGenerated
28 ? (*pGenerated->Channels().rbegin()).get() : nullptr }
29 , mIsProcessor{ isProcessor }
30 , mEffectiveFormat{ effectiveFormat }
65 const auto inputBufferCnt = data.
Position();
66 if (inputBufferCnt > 0) {
Accumulates (non-interleaved) data during effect processing.
void Rewind()
Reset positions to starts of buffers.
unsigned Channels() const
constSamplePtr GetReadPosition(unsigned iChannel) const
Get accumulated data for one channel.
bool Set(constSamplePtr buffer, sampleFormat format, sampleCount start, size_t len, sampleFormat effectiveFormat=widestSampleFormat)
Random-access assignment of a range of samples.
bool Append(constSamplePtr buffer, sampleFormat format, size_t len)
A Track that contains audio waveform data.
const sampleFormat mEffectiveFormat
~WaveTrackSink() override
WaveTrackSink(WaveChannel &left, WaveChannel *pRight, WaveTrack *pGenerated, sampleCount start, bool isProcessor, sampleFormat effectiveFormat)
void DoConsume(Buffers &data)
bool Acquire(Buffers &data) override
Guarantee empty space in Buffers before they are written.
bool Release(const Buffers &data, size_t curBlockSize) override
Acknowledge receipt of data in Buffers, which caller may then Advance()
bool IsOk() const
Whether any errors have occurred in writing data.
WaveChannel *const mGenRight
WaveTrack *const mpGenerated
bool AcceptsBuffers(const Buffers &buffers) const override
Accepts buffers only if there is at least one channel.
WaveChannel *const mpRight
void Flush(Buffers &data)
WaveChannel *const mGenLeft
Positions or offsets within audio files need a wide type.
const char * begin(const char *str) noexcept