diff --git a/source/backend/plugin/CarlaPluginJSFX.cpp b/source/backend/plugin/CarlaPluginJSFX.cpp index fe5a24f4f..cd6e55a41 100644 --- a/source/backend/plugin/CarlaPluginJSFX.cpp +++ b/source/backend/plugin/CarlaPluginJSFX.cpp @@ -840,6 +840,7 @@ public: fFileAPI = new CarlaJsusFxFileAPI; fEffect = new CarlaJsusFx(*fPathLibrary); fEffect->fileAPI = fFileAPI; + fFileAPI->init(fEffect->m_vm); fFilename.assign(filename); // --------------------------------------------------------------- diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp index 474ca91ef..e5e439925 100644 --- a/source/discovery/carla-discovery.cpp +++ b/source/discovery/carla-discovery.cpp @@ -1673,6 +1673,16 @@ static void do_jsfx_check(const char* const filename, bool doInit) uint hints = 0; + /// + JsusFxFileAPI_Basic fileAPI; + effect.fileAPI = &fileAPI; + fileAPI.init(effect.m_vm); + + JsusFxGfx gfxAPI; + effect.gfx = &gfxAPI; + gfxAPI.init(effect.m_vm); + + /// if (doInit) { int compileFlags = diff --git a/source/utils/CarlaJsfxUtils.hpp b/source/utils/CarlaJsfxUtils.hpp index 63353312d..5b7d8c26c 100644 --- a/source/utils/CarlaJsfxUtils.hpp +++ b/source/utils/CarlaJsfxUtils.hpp @@ -30,6 +30,7 @@ #pragma GCC diagnostic ignored "-Wignored-attributes" #include "jsusfx.h" #include "jsusfx_file.h" +#include "jsusfx_gfx.h" #include "jsusfx_serialize.h" #pragma GCC diagnostic pop