Browse Source

Dont strip wasm binaries, cleanup

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.0
falkTX 3 years ago
parent
commit
f90acb5cbb
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 42 additions and 48 deletions
  1. +2
    -2
      source/Makefile.mk
  2. +40
    -46
      source/backend/engine/CarlaEngine.cpp

+ 2
- 2
source/Makefile.mk View File

@@ -50,11 +50,11 @@ endif
else else
# Common linker flags # Common linker flags
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1,--gc-sections LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1,--gc-sections
ifneq ($(WASM),true)
LINK_OPTS += -Wl,--as-needed
ifneq ($(SKIP_STRIPPING),true) ifneq ($(SKIP_STRIPPING),true)
LINK_OPTS += -Wl,--strip-all LINK_OPTS += -Wl,--strip-all
endif endif
ifneq ($(WASM),true)
LINK_OPTS += -Wl,--as-needed
endif endif
endif endif




+ 40
- 46
source/backend/engine/CarlaEngine.cpp View File

@@ -122,37 +122,36 @@ const char* CarlaEngine::getDriverName(const uint index2)
carla_debug("CarlaEngine::getDriverName(%i)", index2); carla_debug("CarlaEngine::getDriverName(%i)", index2);
using namespace EngineInit; using namespace EngineInit;


#ifndef STATIC_PLUGIN_TARGET
uint index = index2; uint index = index2;


# ifdef HAVE_JACK
if (jackbridge_is_ok() && index-- == 0)
#ifdef HAVE_JACK
if (jackbridge_is_ok() && index == 0)
return "JACK"; return "JACK";
# endif
--index;
#endif #endif


#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES
#ifdef USING_JUCE_AUDIO_DEVICES
if (const uint count = getJuceApiCount()) if (const uint count = getJuceApiCount())
{ {
if (index < count) if (index < count)
return getJuceApiName(index); return getJuceApiName(index);
index -= count; index -= count;
} }
# endif
# ifdef USING_RTAUDIO
#endif

#ifdef USING_RTAUDIO
if (const uint count = getRtAudioApiCount()) if (const uint count = getRtAudioApiCount())
{ {
if (index < count) if (index < count)
return getRtAudioApiName(index); return getRtAudioApiName(index);
index -= count; index -= count;
} }
# endif
# ifdef HAVE_SDL
#endif

#ifdef HAVE_SDL
if (index == 0) if (index == 0)
return "SDL"; return "SDL";
--index; --index;
# endif
#endif #endif


carla_stderr("CarlaEngine::getDriverName(%i) - invalid index", index2); carla_stderr("CarlaEngine::getDriverName(%i) - invalid index", index2);
@@ -164,40 +163,39 @@ const char* const* CarlaEngine::getDriverDeviceNames(const uint index2)
carla_debug("CarlaEngine::getDriverDeviceNames(%i)", index2); carla_debug("CarlaEngine::getDriverDeviceNames(%i)", index2);
using namespace EngineInit; using namespace EngineInit;


#ifndef STATIC_PLUGIN_TARGET
uint index = index2; uint index = index2;


# ifdef HAVE_JACK
if (jackbridge_is_ok() && index-- == 0)
#ifdef HAVE_JACK
if (jackbridge_is_ok() && index == 0)
{ {
static const char* ret[3] = { "Auto-Connect ON", "Auto-Connect OFF", nullptr }; static const char* ret[3] = { "Auto-Connect ON", "Auto-Connect OFF", nullptr };
return ret; return ret;
} }
# endif
--index;
#endif #endif


#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES
#ifdef USING_JUCE_AUDIO_DEVICES
if (const uint count = getJuceApiCount()) if (const uint count = getJuceApiCount())
{ {
if (index < count) if (index < count)
return getJuceApiDeviceNames(index); return getJuceApiDeviceNames(index);
index -= count; index -= count;
} }
# endif
# ifdef USING_RTAUDIO
#endif

#ifdef USING_RTAUDIO
if (const uint count = getRtAudioApiCount()) if (const uint count = getRtAudioApiCount())
{ {
if (index < count) if (index < count)
return getRtAudioApiDeviceNames(index); return getRtAudioApiDeviceNames(index);
index -= count; index -= count;
} }
# endif
# ifdef HAVE_SDL
#endif

#ifdef HAVE_SDL
if (index == 0) if (index == 0)
return getSDLDeviceNames(); return getSDLDeviceNames();
--index; --index;
# endif
#endif #endif


carla_stderr("CarlaEngine::getDriverDeviceNames(%i) - invalid index", index2); carla_stderr("CarlaEngine::getDriverDeviceNames(%i) - invalid index", index2);
@@ -209,11 +207,10 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index2
carla_debug("CarlaEngine::getDriverDeviceInfo(%i, \"%s\")", index2, deviceName); carla_debug("CarlaEngine::getDriverDeviceInfo(%i, \"%s\")", index2, deviceName);
using namespace EngineInit; using namespace EngineInit;


#ifndef STATIC_PLUGIN_TARGET
uint index = index2; uint index = index2;


# ifdef HAVE_JACK
if (jackbridge_is_ok() && index-- == 0)
#ifdef HAVE_JACK
if (jackbridge_is_ok() && index == 0)
{ {
static EngineDriverDeviceInfo devInfo; static EngineDriverDeviceInfo devInfo;
devInfo.hints = ENGINE_DRIVER_DEVICE_VARIABLE_BUFFER_SIZE; devInfo.hints = ENGINE_DRIVER_DEVICE_VARIABLE_BUFFER_SIZE;
@@ -221,27 +218,28 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index2
devInfo.sampleRates = nullptr; devInfo.sampleRates = nullptr;
return &devInfo; return &devInfo;
} }
# endif
--index;
#endif #endif


#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES
#ifdef USING_JUCE_AUDIO_DEVICES
if (const uint count = getJuceApiCount()) if (const uint count = getJuceApiCount())
{ {
if (index < count) if (index < count)
return getJuceDeviceInfo(index, deviceName); return getJuceDeviceInfo(index, deviceName);
index -= count; index -= count;
} }
# endif
# ifdef USING_RTAUDIO
#endif

#ifdef USING_RTAUDIO
if (const uint count = getRtAudioApiCount()) if (const uint count = getRtAudioApiCount())
{ {
if (index < count) if (index < count)
return getRtAudioDeviceInfo(index, deviceName); return getRtAudioDeviceInfo(index, deviceName);
index -= count; index -= count;
} }
# endif
# ifdef HAVE_SDL
#endif

#ifdef HAVE_SDL
if (index == 0) if (index == 0)
{ {
static uint32_t sdlBufferSizes[] = { 512, 1024, 2048, 4096, 8192, 0 }; static uint32_t sdlBufferSizes[] = { 512, 1024, 2048, 4096, 8192, 0 };
@@ -253,7 +251,6 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index2
return &devInfo; return &devInfo;
} }
--index; --index;
# endif
#endif #endif


carla_stderr("CarlaEngine::getDriverDeviceInfo(%i, \"%s\") - invalid index", index2, deviceName); carla_stderr("CarlaEngine::getDriverDeviceInfo(%i, \"%s\") - invalid index", index2, deviceName);
@@ -265,39 +262,36 @@ bool CarlaEngine::showDriverDeviceControlPanel(const uint index2, const char* co
carla_debug("CarlaEngine::showDriverDeviceControlPanel(%i, \"%s\")", index2, deviceName); carla_debug("CarlaEngine::showDriverDeviceControlPanel(%i, \"%s\")", index2, deviceName);
using namespace EngineInit; using namespace EngineInit;


#ifndef STATIC_PLUGIN_TARGET
uint index = index2; uint index = index2;


# ifdef HAVE_JACK
if (jackbridge_is_ok() && index-- == 0)
{
#ifdef HAVE_JACK
if (jackbridge_is_ok() && index == 0)
return false; return false;
}
# endif
--index;
#endif #endif


#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES
#ifdef USING_JUCE_AUDIO_DEVICES
if (const uint count = getJuceApiCount()) if (const uint count = getJuceApiCount())
{ {
if (index < count) if (index < count)
return showJuceDeviceControlPanel(index, deviceName); return showJuceDeviceControlPanel(index, deviceName);
index -= count; index -= count;
} }
# endif
# ifdef USING_RTAUDIO
#endif

#ifdef USING_RTAUDIO
if (const uint count = getRtAudioApiCount()) if (const uint count = getRtAudioApiCount())
{ {
if (index < count) if (index < count)
return false; return false;
index -= count; index -= count;
} }
# endif
# ifdef HAVE_SDL
#endif

#ifdef HAVE_SDL
if (index == 0) if (index == 0)
return false; return false;
--index; --index;
# endif
#endif #endif


carla_stderr("CarlaEngine::showDriverDeviceControlPanel(%i, \"%s\") - invalid index", index2, deviceName); carla_stderr("CarlaEngine::showDriverDeviceControlPanel(%i, \"%s\") - invalid index", index2, deviceName);


Loading…
Cancel
Save