Browse Source

Make bridge and mac utils public, add to utils lib

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.5
falkTX 1 year ago
parent
commit
6137680d18
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 40 additions and 20 deletions
  1. +22
    -0
      source/backend/utils/CarlaUtils.cpp
  2. +6
    -10
      source/backend/utils/Makefile
  3. +4
    -4
      source/utils/CarlaBridgeUtils.hpp
  4. +8
    -6
      source/utils/CarlaMacUtils.hpp

+ 22
- 0
source/backend/utils/CarlaUtils.cpp View File

@@ -0,0 +1,22 @@
/*
* Carla Plugin Host
* Copyright (C) 2011-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/

#include "CarlaBridgeUtils.cpp"

#ifdef CARLA_OS_MAC
# include "CarlaMacUtils.cpp"
#endif

+ 6
- 10
source/backend/utils/Makefile View File

@@ -16,6 +16,7 @@ BUILD_CXX_FLAGS += $(YSFX_FLAGS)

OBJS = \
$(OBJDIR)/CachedPlugins.cpp.o \
$(OBJDIR)/CarlaUtils.cpp.o \
$(OBJDIR)/Information.cpp.o \
$(OBJDIR)/JUCE.cpp.o \
$(OBJDIR)/PipeClient.cpp.o \
@@ -26,7 +27,8 @@ TARGETS = $(BINDIR)/libcarla_utils$(LIB_EXT)

# ---------------------------------------------------------------------------------------------------------------------

LIBS = $(MODULEDIR)/lilv.a
LIBS = $(MODULEDIR)/jackbridge.a
LIBS += $(MODULEDIR)/lilv.a
LIBS += $(MODULEDIR)/water.files.a
LIBS += $(MODULEDIR)/ysfx.a

@@ -42,6 +44,7 @@ LIBS += $(MODULEDIR)/juce_gui_basics.a
LIBS += $(MODULEDIR)/juce_gui_extra.a
endif

LINK_FLAGS += $(JACKBRIDGE_LIBS)
LINK_FLAGS += $(LILV_LIBS)
LINK_FLAGS += $(WATER_LIBS)
LINK_FLAGS += $(YSFX_GRAPHICS_LIBS)
@@ -90,16 +93,9 @@ $(BINDIR)/libcarla_utils$(LIB_EXT): $(OBJS) $(LIBS)

ifeq ($(MACOS),true)
ifeq ($(USING_JUCE),true)
$(OBJDIR)/CachedPlugins.cpp.o: CachedPlugins.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -std=gnu++14 -c -o $@
$(OBJDIR)/CachedPlugins.cpp.o: BUILD_CXX_FLAGS += -std=gnu++14
endif

$(OBJDIR)/Windows.cpp.o: Windows.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
$(OBJDIR)/Windows.cpp.o: BUILD_CXX_FLAGS += -ObjC++
endif

$(OBJDIR)/%.cpp.o: %.cpp


+ 4
- 4
source/utils/CarlaBridgeUtils.hpp View File

@@ -240,7 +240,7 @@ struct BridgeNonRtServerData {

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

struct BridgeAudioPool {
struct CARLA_API BridgeAudioPool {
float* data;
std::size_t dataSize;
CarlaString filename;
@@ -263,7 +263,7 @@ struct BridgeAudioPool {

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

struct BridgeRtClientControl : public CarlaRingBufferControl<SmallStackBuffer> {
struct CARLA_API BridgeRtClientControl : public CarlaRingBufferControl<SmallStackBuffer> {
BridgeRtClientData* data;
CarlaString filename;
bool needsSemDestroy; // client only
@@ -303,7 +303,7 @@ struct BridgeRtClientControl : public CarlaRingBufferControl<SmallStackBuffer> {

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

struct BridgeNonRtClientControl : public CarlaRingBufferControl<BigStackBuffer> {
struct CARLA_API BridgeNonRtClientControl : public CarlaRingBufferControl<BigStackBuffer> {
BridgeNonRtClientData* data;
CarlaString filename;
CarlaMutex mutex;
@@ -332,7 +332,7 @@ struct BridgeNonRtClientControl : public CarlaRingBufferControl<BigStackBuffer>

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

struct BridgeNonRtServerControl : public CarlaRingBufferControl<HugeStackBuffer> {
struct CARLA_API BridgeNonRtServerControl : public CarlaRingBufferControl<HugeStackBuffer> {
BridgeNonRtServerData* data;
CarlaString filename;
CarlaMutex mutex;


+ 8
- 6
source/utils/CarlaMacUtils.hpp View File

@@ -1,6 +1,6 @@
/*
* Carla macOS utils
* Copyright (C) 2018-2022 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2018-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -27,26 +27,28 @@
// don't include Foundation.h here
typedef struct __CFBundle* CFBundleRef;

CARLA_BACKEND_START_NAMESPACE

// --------------------------------------------------------------------------------------------------------------------
// a few public functions

/*
* ...
*/
void initStandaloneApplication();
CARLA_PLUGIN_EXPORT void initStandaloneApplication();

/*
* ...
*/
const char* findBinaryInBundle(const char* const bundleDir);
CARLA_PLUGIN_EXPORT const char* findBinaryInBundle(const char* const bundleDir);

/*
* ...
*/
bool removeFileFromQuarantine(const char* const filename);
CARLA_PLUGIN_EXPORT bool removeFileFromQuarantine(const char* const filename);

// --------------------------------------------------------------------------------------------------------------------
// and now then private stuff

CARLA_BACKEND_START_NAMESPACE

/*
* ...


Loading…
Cancel
Save