DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit d8612aa3601f308c3be81e0120bbf16772257b46
parent a9951390e653928673ab36f979bcd532c9aa6434
Author: falkTX <falktx@falktx.com>
Date:   Sun,  3 Jul 2022 19:33:22 +0100

More wasm related things, generating "standalones"

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
MMakefile.base.mk | 8+++++---
MMakefile.plugins.mk | 7++++++-
Mdistrho/src/DistrhoPluginJACK.cpp | 2+-
Mdistrho/src/DistrhoUIPrivateData.hpp | 2++
4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/Makefile.base.mk b/Makefile.base.mk @@ -160,11 +160,11 @@ BASE_FLAGS = -Wall -Wextra -pipe -MD -MP BASE_OPTS = -O3 -ffast-math -fdata-sections -ffunction-sections ifeq ($(CPU_I386_OR_X86_64),true) -BASE_OPTS += -mtune=generic -msse -msse2 +BASE_OPTS += -mtune=generic ifeq ($(WASM),true) -BASE_OPTS += -msse3 -msimd128 +# BASE_OPTS += -msse -msse2 -msse3 -msimd128 else -BASE_OPTS += -mfpmath=sse +BASE_OPTS += -msse -msse2 -mfpmath=sse endif endif @@ -546,6 +546,8 @@ endif ifeq ($(MACOS),true) SHARED = -dynamiclib +else ifeq ($(WASM),true) +SHARED = -sSIDE_MODULE=1 else SHARED = -shared endif diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk @@ -60,7 +60,12 @@ endif # --------------------------------------------------------------------------------------------------------------------- # JACK/Standalone setup -ifneq ($(SKIP_RTAUDIO_FALLBACK),true) +ifeq ($(WASM),true) + +JACK_FLAGS += -sUSE_SDL=2 +JACK_LIBS += -sUSE_SDL=2 + +else ifneq ($(SKIP_RTAUDIO_FALLBACK),true) ifeq ($(MACOS),true) JACK_LIBS += -framework CoreAudio -framework CoreFoundation diff --git a/distrho/src/DistrhoPluginJACK.cpp b/distrho/src/DistrhoPluginJACK.cpp @@ -31,7 +31,7 @@ # include "../extra/Thread.hpp" #endif -#ifdef STATIC_BUILD +#if defined(STATIC_BUILD) && !defined(DISTRHO_OS_WASM) # define JACKBRIDGE_DIRECT #endif diff --git a/distrho/src/DistrhoUIPrivateData.hpp b/distrho/src/DistrhoUIPrivateData.hpp @@ -107,6 +107,7 @@ public: explicit PluginApplication() : DGL_NAMESPACE::Application(DISTRHO_UI_IS_STANDALONE) { +#ifndef DISTRHO_OS_WASM const char* const className = ( #ifdef DISTRHO_PLUGIN_BRAND DISTRHO_PLUGIN_BRAND @@ -116,6 +117,7 @@ public: "-" DISTRHO_PLUGIN_NAME ); setClassName(className); +#endif } void triggerIdleCallbacks()