Browse Source

Handle worst-case scenario of carla-plugin buffer size being too low

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.9.14
falkTX 6 years ago
parent
commit
29bcab0532
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      source/backend/engine/CarlaEngineNative.cpp

+ 11
- 1
source/backend/engine/CarlaEngineNative.cpp View File

@@ -1,6 +1,6 @@
/*
* Carla Plugin Host
* Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -1483,6 +1483,16 @@ protected:
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames,
const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount)
{
if (frames > pData->bufferSize)
{
carla_stderr2("Host is calling process with too high number of frames! %u vs %u",
frames, pData->bufferSize);

deactivate();
bufferSizeChanged(frames);
activate();
}

const PendingRtEventsRunner prt(this, frames);

// ---------------------------------------------------------------


Loading…
Cancel
Save