Browse Source

Tweaks to get external dpf plugins to build together

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.0
falkTX 3 years ago
parent
commit
429019a3c0
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 11 additions and 18 deletions
  1. +1
    -0
      source/Makefile.mk
  2. +1
    -1
      source/modules/distrho/DistrhoUIMain.cpp
  3. +8
    -16
      source/modules/distrho/src/DistrhoPluginCarla.cpp
  4. +1
    -1
      source/native-plugins/external

+ 1
- 0
source/Makefile.mk View File

@@ -178,6 +178,7 @@ endif

ifeq ($(HAVE_DGL),true)
BASE_FLAGS += -DHAVE_DGL
BASE_FLAGS += -DHAVE_OPENGL
BASE_FLAGS += -DDGL_NAMESPACE=CarlaDGL
BASE_FLAGS += -DDGL_OPENGL
BASE_FLAGS += -DDGL_FILE_BROWSER_DISABLED


+ 1
- 1
source/modules/distrho/DistrhoUIMain.cpp View File

@@ -34,7 +34,7 @@
# error unsupported format
#endif

#if !DISTRHO_PLUGIN_WANT_DIRECT_ACCESS && !DISTRHO_PLUGIN_TARGET_JACK && !DISTRHO_PLUGIN_TARGET_VST2 && !DISTRHO_PLUGIN_TARGET_VST3
#if !DISTRHO_PLUGIN_WANT_DIRECT_ACCESS && !defined(DISTRHO_PLUGIN_TARGET_CARLA) && !defined(DISTRHO_PLUGIN_TARGET_JACK) && !defined(DISTRHO_PLUGIN_TARGET_VST2) && !defined(DISTRHO_PLUGIN_TARGET_VST3)
# ifdef DISTRHO_PLUGIN_TARGET_DSSI
# define DISTRHO_IS_STANDALONE 1
# else


+ 8
- 16
source/modules/distrho/src/DistrhoPluginCarla.cpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
@@ -55,7 +55,12 @@ class UICarla
public:
UICarla(const NativeHostDescriptor* const host, PluginExporter* const plugin)
: fHost(host),
fUI(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, setSizeCallback, plugin->getInstancePointer())
fUI(this, 0, plugin->getSampleRate(),
editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback,
nullptr, // window size
nullptr, // TODO file request
nullptr, // bundle path
plugin->getInstancePointer())
{
fUI.setWindowTitle(host->uiName);

@@ -77,7 +82,7 @@ public:

bool carla_idle()
{
return fUI.idle();
return fUI.plugin_idle();
}

void carla_setParameterValue(const uint32_t index, const float value)
@@ -131,11 +136,6 @@ protected:
}
#endif

void handleSetSize(const uint width, const uint height)
{
fUI.setWindowSize(width, height);
}

// ---------------------------------------------

private:
@@ -174,11 +174,6 @@ private:
}
#endif

static void setSizeCallback(void* ptr, uint width, uint height)
{
handlePtr->handleSetSize(width, height);
}

#undef handlePtr

CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UICarla)
@@ -502,10 +497,7 @@ private:
void createUiIfNeeded()
{
if (fUiPtr == nullptr)
{
d_lastUiSampleRate = getSampleRate();
fUiPtr = new UICarla(getHostHandle(), &fPlugin);
}
}
#endif



+ 1
- 1
source/native-plugins/external

@@ -1 +1 @@
Subproject commit 04544c544632bf3e67eb91ebe71ed7c5a1a8ddde
Subproject commit edebaabb1228ffb775f9d9a8395a858ba365cdf8

Loading…
Cancel
Save