Browse Source

Include utils code in carla-host-plugin library

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.3.0-RC1
falkTX 4 years ago
parent
commit
63c5af5d2b
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 28 additions and 13 deletions
  1. +11
    -9
      source/backend/utils/CachedPlugins.cpp
  2. +1
    -1
      source/backend/utils/Information.cpp
  3. +3
    -1
      source/backend/utils/PipeClient.cpp
  4. +13
    -2
      source/plugin/carla-host-plugin.cpp

+ 11
- 9
source/backend/utils/CachedPlugins.cpp View File

@@ -34,7 +34,7 @@ namespace CB = CarlaBackend;

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

static const char* const gNullCharPtr = "";
static const char* const gCachedPluginsNullCharPtr = "";

static bool isCachedPluginType(const CB::PluginType ptype)
{
@@ -64,10 +64,10 @@ _CarlaCachedPluginInfo::_CarlaCachedPluginInfo() noexcept
midiOuts(0),
parameterIns(0),
parameterOuts(0),
name(gNullCharPtr),
label(gNullCharPtr),
maker(gNullCharPtr),
copyright(gNullCharPtr) {}
name(gCachedPluginsNullCharPtr),
label(gCachedPluginsNullCharPtr),
maker(gCachedPluginsNullCharPtr),
copyright(gCachedPluginsNullCharPtr) {}

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

@@ -566,7 +566,7 @@ static const CarlaCachedPluginInfo* get_cached_plugin_au(const juce::String plug
info.name = sname;
info.label = slabel;
info.maker = smaker;
info.copyright = gNullCharPtr;
info.copyright = gCachedPluginsNullCharPtr;

return &info;
}
@@ -601,8 +601,8 @@ static const CarlaCachedPluginInfo* get_cached_plugin_sfz(const water::File& fil

info.name = name.buffer();
info.label = filename.buffer();
info.maker = gNullCharPtr;
info.copyright = gNullCharPtr;
info.maker = gCachedPluginsNullCharPtr;
info.copyright = gCachedPluginsNullCharPtr;
return &info;
}

@@ -694,6 +694,8 @@ const CarlaCachedPluginInfo* carla_get_cached_plugin_info(CB::PluginType ptype,

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

#include "../native-plugins/_data.cpp"
#ifndef CARLA_PLUGIN_EXPORT
# include "../native-plugins/_data.cpp"
#endif

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

+ 1
- 1
source/backend/utils/Information.cpp View File

@@ -221,7 +221,7 @@ const char* const* carla_get_supported_features()

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

#ifndef CARLA_SKIP_HOST_COMMON
#ifndef CARLA_PLUGIN_EXPORT
# include "../CarlaHostCommon.cpp"
#endif



+ 3
- 1
source/backend/utils/PipeClient.cpp View File

@@ -209,6 +209,8 @@ void carla_pipe_client_destroy(CarlaPipeClientHandle handle)

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

#include "CarlaPipeUtils.cpp"
#ifndef CARLA_PLUGIN_EXPORT
# include "CarlaPipeUtils.cpp"
#endif

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

+ 13
- 2
source/plugin/carla-host-plugin.cpp View File

@@ -15,7 +15,19 @@
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/

#include "water/files/File.h"
#include "CarlaHost.h"
#include "CarlaUtils.h"

#define CARLA_PLUGIN_EXPORT

// -------------------------------------------------------------------------------------------------------------------
// Include utils code first

#include "utils/CachedPlugins.cpp"
#include "utils/Information.cpp"
#include "utils/PipeClient.cpp"
#include "utils/System.cpp"
#include "utils/Windows.cpp"

// -------------------------------------------------------------------------------------------------------------------
// Always return a valid string ptr
@@ -31,7 +43,6 @@ static void checkStringPtr(const char*& charPtr) noexcept
// -------------------------------------------------------------------------------------------------------------------
// Include all standalone code

#define CARLA_PLUGIN_EXPORT
#include "CarlaStandalone.cpp"

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

Loading…
Cancel
Save