I’m having difficulty using and understanding one of AudioBlock’s constructor. My main problem is with the assertion.
AudioBlock (AudioBuffer<SampleType>& buffer, size_t startSampleIndex) noexcept
: channels (buffer.getArrayOfWritePointers()),
numChannels (static_cast<ChannelCountType> (buffer.getNumChannels())),
startSample (startSampleIndex),
numSamples (static_cast<size_t> (buffer.getNumSamples()) - startSampleIndex)
{
jassert (startSample < numSamples);
}
I think the correct assertion should be
jassert(startSample < buffer.getNumSamples())
It seems to be a consequence of fixing the below issue without modifying the assertion.
