Browse Source

Get all plugins to build for wasm

Signed-off-by: falkTX <falktx@falktx.com>
pull/321/head
falkTX 2 years ago
parent
commit
ea18b1a1ad
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 14 additions and 6 deletions
  1. +9
    -3
      Makefile.base.mk
  2. +2
    -2
      Makefile.plugins.mk
  3. +1
    -1
      distrho/src/DistrhoPluginVST2.cpp
  4. +2
    -0
      distrho/src/jackbridge/SDLBridge.hpp

+ 9
- 3
Makefile.base.mk View File

@@ -175,20 +175,24 @@ endif
endif

ifeq ($(MACOS),true)

# MacOS linker flags
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip,-dead_strip_dylibs
ifneq ($(SKIP_STRIPPING),true)
LINK_OPTS += -Wl,-x
endif

else

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

endif

ifeq ($(SKIP_STRIPPING),true)
@@ -535,6 +539,8 @@ endif

ifeq ($(MACOS),true)
LIB_EXT = .dylib
else ifeq ($(WASM),true)
LIB_EXT = .wasm
else ifeq ($(WINDOWS),true)
LIB_EXT = .dll
else
@@ -547,7 +553,7 @@ endif
ifeq ($(MACOS),true)
SHARED = -dynamiclib
else ifeq ($(WASM),true)
SHARED = -sSIDE_MODULE=1
SHARED = -sSIDE_MODULE=2
else
SHARED = -shared
endif


+ 2
- 2
Makefile.plugins.mk View File

@@ -170,9 +170,9 @@ SYMBOLS_SHARED = -Wl,-exported_symbols_list,$(DPF_PATH)/utils/symbols/shared.exp
else ifeq ($(WASM),true)
SYMBOLS_LADSPA = -sEXPORTED_FUNCTIONS="['ladspa_descriptor']"
SYMBOLS_DSSI = -sEXPORTED_FUNCTIONS="['ladspa_descriptor','dssi_descriptor']"
SYMBOLS_LV2DSP = -sEXPORTED_FUNCTIONS="['lv2_descriptor']"
SYMBOLS_LV2DSP = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2_generate_ttl']"
SYMBOLS_LV2UI = -sEXPORTED_FUNCTIONS="['lv2ui_descriptor']"
SYMBOLS_LV2 = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2ui_descriptor']"
SYMBOLS_LV2 = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2_generate_ttl','lv2ui_descriptor']"
SYMBOLS_VST2 = -sEXPORTED_FUNCTIONS="['VSTPluginMain']"
SYMBOLS_VST3 = -sEXPORTED_FUNCTIONS="['GetPluginFactory','ModuleEntry','ModuleExit']"
SYMBOLS_SHARED = -sEXPORTED_FUNCTIONS="['createSharedPlugin']"


+ 1
- 1
distrho/src/DistrhoPluginVST2.cpp View File

@@ -1665,7 +1665,7 @@ static struct Cleanup {
END_NAMESPACE_DISTRHO

DISTRHO_PLUGIN_EXPORT
#if DISTRHO_OS_WINDOWS || DISTRHO_OS_MAC
#if DISTRHO_OS_MAC || DISTRHO_OS_WASM || DISTRHO_OS_WINDOWS
const AEffect* VSTPluginMain(audioMasterCallback audioMaster);
#else
const AEffect* VSTPluginMain(audioMasterCallback audioMaster) asm ("main");


+ 2
- 0
distrho/src/jackbridge/SDLBridge.hpp View File

@@ -204,11 +204,13 @@ struct SDLBridge {

self->jackProcessCallback(numFrames, self->jackProcessArg);

#if DISTRHO_PLUGIN_NUM_OUTPUTS > 0
for (uint i=0; i < DISTRHO_PLUGIN_NUM_OUTPUTS; ++i)
{
for (uint j=0; j < numFrames; ++j)
fstream[j * DISTRHO_PLUGIN_NUM_OUTPUTS + i] = self->audioBuffers[DISTRHO_PLUGIN_NUM_INPUTS+i][j];
}
#endif
}

};


Loading…
Cancel
Save