mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added an assertion in AudioThumbnail
This commit is contained in:
parent
e034958d55
commit
e05e9a470a
1 changed files with 3 additions and 1 deletions
|
|
@ -693,7 +693,9 @@ int64 AudioThumbnail::getHashCode() const
|
|||
void AudioThumbnail::addBlock (const int64 startSample, const AudioSampleBuffer& incoming,
|
||||
int startOffsetInBuffer, int numSamples)
|
||||
{
|
||||
jassert (startSample >= 0);
|
||||
jassert (startSample >= 0
|
||||
&& startOffsetInBuffer >= 0
|
||||
&& startOffsetInBuffer + numSamples <= incoming.getNumSamples());
|
||||
|
||||
const int firstThumbIndex = (int) (startSample / samplesPerThumbSample);
|
||||
const int lastThumbIndex = (int) ((startSample + numSamples + (samplesPerThumbSample - 1)) / samplesPerThumbSample);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue