Browse Source

Nicer printing on out of bounds midi event time

tags/v1.9.11
falkTX 6 years ago
parent
commit
04dbc3fbee
8 changed files with 15 additions and 7 deletions
  1. +1
    -1
      source/backend/plugin/CarlaPluginDSSI.cpp
  2. +1
    -1
      source/backend/plugin/CarlaPluginFluidSynth.cpp
  3. +1
    -1
      source/backend/plugin/CarlaPluginLADSPA.cpp
  4. +1
    -1
      source/backend/plugin/CarlaPluginLV2.cpp
  5. +1
    -1
      source/backend/plugin/CarlaPluginNative.cpp
  6. +1
    -1
      source/backend/plugin/CarlaPluginSFZero.cpp
  7. +1
    -1
      source/backend/plugin/CarlaPluginVST2.cpp
  8. +8
    -0
      source/includes/CarlaDefines.h

+ 1
- 1
source/backend/plugin/CarlaPluginDSSI.cpp View File

@@ -1417,7 +1417,7 @@ public:
const EngineEvent& event(pData->event.portIn->getEvent(i));

uint32_t eventTime = event.time;
CARLA_SAFE_ASSERT_CONTINUE(eventTime < frames);
CARLA_SAFE_ASSERT_UINT2_CONTINUE(eventTime < frames, eventTime, frames);

if (eventTime < timeOffset)
{


+ 1
- 1
source/backend/plugin/CarlaPluginFluidSynth.cpp View File

@@ -1130,7 +1130,7 @@ public:
const EngineEvent& event(pData->event.portIn->getEvent(i));

uint32_t eventTime = event.time;
CARLA_SAFE_ASSERT_CONTINUE(eventTime < frames);
CARLA_SAFE_ASSERT_UINT2_CONTINUE(eventTime < frames, eventTime, frames);

if (eventTime < timeOffset)
{


+ 1
- 1
source/backend/plugin/CarlaPluginLADSPA.cpp View File

@@ -942,7 +942,7 @@ public:
const EngineEvent& event(pData->event.portIn->getEvent(i));

uint32_t eventTime = event.time;
CARLA_SAFE_ASSERT_CONTINUE(eventTime < frames);
CARLA_SAFE_ASSERT_UINT2_CONTINUE(eventTime < frames, eventTime, frames);

if (eventTime < timeOffset)
{


+ 1
- 1
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -3044,7 +3044,7 @@ public:
const EngineEvent& event(fEventsIn.ctrl->port->getEvent(i));

uint32_t eventTime = event.time;
CARLA_SAFE_ASSERT_CONTINUE(eventTime < frames);
CARLA_SAFE_ASSERT_UINT2_CONTINUE(eventTime < frames, eventTime, frames);

if (eventTime < timeOffset)
{


+ 1
- 1
source/backend/plugin/CarlaPluginNative.cpp View File

@@ -1618,7 +1618,7 @@ public:
break;

uint32_t eventTime = event.time;
CARLA_SAFE_ASSERT_CONTINUE(eventTime < frames);
CARLA_SAFE_ASSERT_UINT2_CONTINUE(eventTime < frames, eventTime, frames);

if (eventTime < timeOffset)
{


+ 1
- 1
source/backend/plugin/CarlaPluginSFZero.cpp View File

@@ -373,7 +373,7 @@ public:
const EngineEvent& event(pData->event.portIn->getEvent(i));

uint32_t eventTime = event.time;
CARLA_SAFE_ASSERT_CONTINUE(eventTime < frames);
CARLA_SAFE_ASSERT_UINT2_CONTINUE(eventTime < frames, eventTime, frames);

if (eventTime < timeOffset)
{


+ 1
- 1
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -1218,7 +1218,7 @@ public:
const EngineEvent& event(pData->event.portIn->getEvent(i));

uint32_t eventTime = event.time;
CARLA_SAFE_ASSERT_CONTINUE(eventTime < frames);
CARLA_SAFE_ASSERT_UINT2_CONTINUE(eventTime < frames, eventTime, frames);

if (eventTime < timeOffset)
{


+ 8
- 0
source/includes/CarlaDefines.h View File

@@ -175,6 +175,14 @@
#define CARLA_SAFE_ASSERT_CONTINUE(cond) if (! (cond)) { carla_safe_assert(#cond, __FILE__, __LINE__); continue; }
#define CARLA_SAFE_ASSERT_RETURN(cond, ret) if (! (cond)) { carla_safe_assert(#cond, __FILE__, __LINE__); return ret; }

#define CARLA_SAFE_ASSERT_INT2_BREAK(cond, v1, v2) if (! (cond)) { carla_safe_assert_int2(#cond, __FILE__, __LINE__, static_cast<int>(v1), static_cast<int>(v2)); break; }
#define CARLA_SAFE_ASSERT_INT2_CONTINUE(cond, v1, v2) if (! (cond)) { carla_safe_assert_int2(#cond, __FILE__, __LINE__, static_cast<int>(v1), static_cast<int>(v2)); continue; }
#define CARLA_SAFE_ASSERT_INT2_RETURN(cond, v1, v2, ret) if (! (cond)) { carla_safe_assert_int2(#cond, __FILE__, __LINE__, static_cast<int>(v1), static_cast<int>(v2)); return ret; }

#define CARLA_SAFE_ASSERT_UINT2_BREAK(cond, v1, v2) if (! (cond)) { carla_safe_assert_uint2(#cond, __FILE__, __LINE__, static_cast<uint>(v1), static_cast<uint>(v2)); break; }
#define CARLA_SAFE_ASSERT_UINT2_CONTINUE(cond, v1, v2) if (! (cond)) { carla_safe_assert_uint2(#cond, __FILE__, __LINE__, static_cast<uint>(v1), static_cast<uint>(v2)); continue; }
#define CARLA_SAFE_ASSERT_UINT2_RETURN(cond, v1, v2, ret) if (! (cond)) { carla_safe_assert_uint2(#cond, __FILE__, __LINE__, static_cast<uint>(v1), static_cast<uint>(v2)); return ret; }

/* Define CARLA_SAFE_EXCEPTION */
#define CARLA_SAFE_EXCEPTION(msg) catch(...) { carla_safe_exception(msg, __FILE__, __LINE__); }



Loading…
Cancel
Save