From 67ca1fa6f734f83924102f913c3ed2ccebf85821 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 16 Jan 2019 15:52:03 +0100 Subject: [PATCH] Fixup sfzero for new water changes Signed-off-by: falkTX --- source/modules/sfzero/sfzero/SFZVoice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/modules/sfzero/sfzero/SFZVoice.cpp b/source/modules/sfzero/sfzero/SFZVoice.cpp index 01b6aba2f..05a90e84f 100644 --- a/source/modules/sfzero/sfzero/SFZVoice.cpp +++ b/source/modules/sfzero/sfzero/SFZVoice.cpp @@ -192,8 +192,9 @@ void Voice::renderNextBlock(water::AudioSampleBuffer &outputBuffer, int startSam while (--numSamples >= 0) { - int pos = static_cast(sourceSamplePosition); - jassert(pos >= 0 && pos < bufferNumSamples); // leoo + const int pos = static_cast(sourceSamplePosition); + CARLA_SAFE_ASSERT_CONTINUE(pos >= 0 && pos < bufferNumSamples); // leoo + float alpha = static_cast(sourceSamplePosition - pos); float invAlpha = 1.0f - alpha; int nextPos = pos + 1;