Browse Source

Really fix build, unless compiler crashes..

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.0
falkTX 2 years ago
parent
commit
1ee091f4cc
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 18 additions and 6 deletions
  1. +8
    -2
      source/backend/plugin/CarlaPluginJuce.cpp
  2. +8
    -2
      source/backend/plugin/CarlaPluginVST2.cpp
  3. +2
    -2
      source/modules/ysfx/Makefile

+ 8
- 2
source/backend/plugin/CarlaPluginJuce.cpp View File

@@ -1652,9 +1652,10 @@ public:
juce::OwnedArray<juce::PluginDescription> pluginDescriptions; juce::OwnedArray<juce::PluginDescription> pluginDescriptions;
juce::KnownPluginList plist; juce::KnownPluginList plist;


#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
{ {
#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
const ScopedAbortCatcher sac; const ScopedAbortCatcher sac;
#endif


for (int i = 0; i < fFormatManager.getNumFormats(); ++i) for (int i = 0; i < fFormatManager.getNumFormats(); ++i)
{ {
@@ -1667,15 +1668,16 @@ public:
plist.scanAndAddFile(fileOrIdentifier, true, pluginDescriptions, *apformat); plist.scanAndAddFile(fileOrIdentifier, true, pluginDescriptions, *apformat);
} CARLA_SAFE_EXCEPTION_CONTINUE("scanAndAddFile") } CARLA_SAFE_EXCEPTION_CONTINUE("scanAndAddFile")


#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
if (sac.wasTriggered()) if (sac.wasTriggered())
{ {
carla_stderr("WARNING: Caught exception while scanning file, will not load this plugin"); carla_stderr("WARNING: Caught exception while scanning file, will not load this plugin");
pluginDescriptions.clearQuick(false); pluginDescriptions.clearQuick(false);
break; break;
} }
#endif
} }
} }
#endif


if (pluginDescriptions.size() == 0) if (pluginDescriptions.size() == 0)
{ {
@@ -1692,7 +1694,9 @@ public:
juce::String error; juce::String error;


{ {
#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
const ScopedAbortCatcher sac; const ScopedAbortCatcher sac;
#endif


try { try {
fInstance = fFormatManager.createPluginInstance(fDesc, fInstance = fFormatManager.createPluginInstance(fDesc,
@@ -1701,11 +1705,13 @@ public:
error); error);
} CARLA_SAFE_EXCEPTION("createPluginInstance") } CARLA_SAFE_EXCEPTION("createPluginInstance")


#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
if (sac.wasTriggered()) if (sac.wasTriggered())
{ {
fInstance = nullptr; fInstance = nullptr;
carla_stderr("WARNING: Caught exception while instantiating, will not load this plugin"); carla_stderr("WARNING: Caught exception while instantiating, will not load this plugin");
} }
#endif
} }


if (fInstance == nullptr) if (fInstance == nullptr)


+ 8
- 2
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -2565,10 +2565,11 @@ public:
sCurrentUniqueId = static_cast<intptr_t>(uniqueId); sCurrentUniqueId = static_cast<intptr_t>(uniqueId);
sLastCarlaPluginVST2 = this; sLastCarlaPluginVST2 = this;


#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
bool wasTriggered, wasThrown = false; bool wasTriggered, wasThrown = false;
{ {
#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
const ScopedAbortCatcher sac; const ScopedAbortCatcher sac;
#endif


try { try {
fEffect = vstFn(carla_vst_audioMasterCallback); fEffect = vstFn(carla_vst_audioMasterCallback);
@@ -2576,19 +2577,24 @@ public:
wasThrown = true; wasThrown = true;
} }


#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
wasTriggered = sac.wasTriggered(); wasTriggered = sac.wasTriggered();
#else
wasTriggered = false;
#endif
} }


// try again if plugin blows // try again if plugin blows
if (wasTriggered || wasThrown) if (wasTriggered || wasThrown)
{ {
#if !(defined(CARLA_OS_WASM) || defined(CARLA_OS_WIN))
const ScopedAbortCatcher sac; const ScopedAbortCatcher sac;
#endif


try { try {
fEffect = vstFn(carla_vst_audioMasterCallback); fEffect = vstFn(carla_vst_audioMasterCallback);
} CARLA_SAFE_EXCEPTION_RETURN("VST init 2nd attempt", false); } CARLA_SAFE_EXCEPTION_RETURN("VST init 2nd attempt", false);
} }
#endif


sLastCarlaPluginVST2 = nullptr; sLastCarlaPluginVST2 = nullptr;
sCurrentUniqueId = 0; sCurrentUniqueId = 0;


+ 2
- 2
source/modules/ysfx/Makefile View File

@@ -53,8 +53,8 @@ ifeq ($(WINDOWS),true)
YSFX_FLAGS += -DNOMINMAX YSFX_FLAGS += -DNOMINMAX
endif endif


ifneq ($(WINDOWS)$(CPU_I386),truetrue)
# NOTE: not compatible with MingGW, breaks win32_utf8
ifeq (,$(findstring true,$(WINDOWS)$(CPU_I386)))
# NOTE: not compatible with MingGW or i386 systems
YSFX_FLAGS += -D_FILE_OFFSET_BITS=64 YSFX_FLAGS += -D_FILE_OFFSET_BITS=64
endif endif




Loading…
Cancel
Save