From 1cb5fa39d3bb38588c8895ab3ad842d39dbfc6f7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 15 May 2022 00:05:55 +0100 Subject: [PATCH] Deal with buffer size only in activate --- src/CardinalPlugin.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index a4c56ca..6767404 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -1075,11 +1075,12 @@ protected: void activate() override { + context->bufferSize = getBufferSize(); + #if DISTRHO_PLUGIN_NUM_INPUTS != 0 - const uint32_t bufferSize = getBufferSize(); fAudioBufferCopy = new float*[DISTRHO_PLUGIN_NUM_INPUTS]; for (int i=0; ibufferSize]; #endif fNextExpectedFrame = 0; @@ -1183,12 +1184,6 @@ protected: fWasBypassed = bypassed; } - void bufferSizeChanged(const uint32_t newBufferSize) override - { - rack::contextSet(context); - context->bufferSize = newBufferSize; - } - void sampleRateChanged(const double newSampleRate) override { rack::contextSet(context);