Deal with buffer size only in activate
This commit is contained in:
parent
fd6cd85f30
commit
1cb5fa39d3
1 changed files with 3 additions and 8 deletions
|
|
@ -1075,11 +1075,12 @@ protected:
|
||||||
|
|
||||||
void activate() override
|
void activate() override
|
||||||
{
|
{
|
||||||
|
context->bufferSize = getBufferSize();
|
||||||
|
|
||||||
#if DISTRHO_PLUGIN_NUM_INPUTS != 0
|
#if DISTRHO_PLUGIN_NUM_INPUTS != 0
|
||||||
const uint32_t bufferSize = getBufferSize();
|
|
||||||
fAudioBufferCopy = new float*[DISTRHO_PLUGIN_NUM_INPUTS];
|
fAudioBufferCopy = new float*[DISTRHO_PLUGIN_NUM_INPUTS];
|
||||||
for (int i=0; i<DISTRHO_PLUGIN_NUM_INPUTS; ++i)
|
for (int i=0; i<DISTRHO_PLUGIN_NUM_INPUTS; ++i)
|
||||||
fAudioBufferCopy[i] = new float[bufferSize];
|
fAudioBufferCopy[i] = new float[context->bufferSize];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fNextExpectedFrame = 0;
|
fNextExpectedFrame = 0;
|
||||||
|
|
@ -1183,12 +1184,6 @@ protected:
|
||||||
fWasBypassed = bypassed;
|
fWasBypassed = bypassed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bufferSizeChanged(const uint32_t newBufferSize) override
|
|
||||||
{
|
|
||||||
rack::contextSet(context);
|
|
||||||
context->bufferSize = newBufferSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sampleRateChanged(const double newSampleRate) override
|
void sampleRateChanged(const double newSampleRate) override
|
||||||
{
|
{
|
||||||
rack::contextSet(context);
|
rack::contextSet(context);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue