Signed-off-by: falkTX <falktx@falktx.com>fix-audiofile-buffering
@@ -272,18 +272,6 @@ LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/water.posix32.a | |||
ifeq ($(USING_JUCE),true) | |||
LIBS_POSIX32 += $(MODULEDIR)/carla_juce.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/juce_audio_basics.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/juce_audio_processors.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/juce_data_structures.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/juce_core.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/juce_events.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/juce_graphics.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/juce_gui_basics.posix32.a | |||
LIBS_POSIX32 += $(MODULEDIR)/juce_gui_extra.posix32.a | |||
endif | |||
posix32: $(LIBS_POSIX32) | |||
$(MAKE) -C source/bridges-plugin posix32 | |||
$(MAKE) -C source/discovery posix32 | |||
@@ -296,18 +284,6 @@ LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/water.posix64.a | |||
ifeq ($(USING_JUCE),true) | |||
LIBS_POSIX64 += $(MODULEDIR)/carla_juce.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/juce_audio_basics.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/juce_audio_processors.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/juce_data_structures.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/juce_core.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/juce_events.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/juce_graphics.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/juce_gui_basics.posix64.a | |||
LIBS_POSIX64 += $(MODULEDIR)/juce_gui_extra.posix64.a | |||
endif | |||
posix64: $(LIBS_POSIX64) | |||
$(MAKE) -C source/bridges-plugin posix64 | |||
$(MAKE) -C source/discovery posix64 | |||
@@ -30,7 +30,7 @@ | |||
#include "water/files/File.h" | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
# include "carla_juce/carla_juce.h" | |||
#endif | |||
@@ -404,7 +404,7 @@ bool carla_engine_init(CarlaHostHandle handle, const char* driverName, const cha | |||
carla_setenv("WINEASIO_CLIENT_NAME", clientName); | |||
#endif | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
CarlaJUCE::initialiseJuce_GUI(); | |||
#endif | |||
@@ -454,7 +454,7 @@ bool carla_engine_init(CarlaHostHandle handle, const char* driverName, const cha | |||
shandle.lastError = engine->getLastError(); | |||
shandle.engine = nullptr; | |||
delete engine; | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
CarlaJUCE::shutdownJuce_GUI(); | |||
#endif | |||
return false; | |||
@@ -534,7 +534,7 @@ bool carla_engine_close(CarlaHostHandle handle) | |||
shandle.engine = nullptr; | |||
delete engine; | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
CarlaJUCE::shutdownJuce_GUI(); | |||
#endif | |||
return closed; | |||
@@ -546,7 +546,7 @@ void carla_engine_idle(CarlaHostHandle handle) | |||
handle->engine->idle(); | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
if (handle->isStandalone) | |||
CarlaJUCE::idleJuce_GUI(); | |||
#endif | |||
@@ -18,7 +18,7 @@ | |||
#include "CarlaPluginInternal.hpp" | |||
#include "CarlaEngine.hpp" | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
#include "CarlaBackendUtils.hpp" | |||
#include "CarlaMathUtils.hpp" | |||
@@ -1888,7 +1888,7 @@ private: | |||
CARLA_BACKEND_END_NAMESPACE | |||
#endif // USING_JUCE | |||
#endif // USING_JUCE && !BUILD_BRIDGE | |||
// ------------------------------------------------------------------------------------------------------------------- | |||
@@ -1899,7 +1899,7 @@ CarlaPluginPtr CarlaPlugin::newJuce(const Initializer& init, const char* const f | |||
carla_debug("CarlaPlugin::newJuce({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "}, %s)", | |||
init.engine, init.filename, init.name, init.label, init.uniqueId, format); | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
std::shared_ptr<CarlaPluginJuce> plugin(new CarlaPluginJuce(init.engine, init.id)); | |||
if (! plugin->init(plugin, init.filename, init.name, init.label, init.uniqueId, init.options, format)) | |||
@@ -31,7 +31,7 @@ | |||
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" | |||
#endif | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
# include "carla_juce/carla_juce.h" | |||
#endif | |||
@@ -128,7 +128,7 @@ const char* carla_get_juce_version() | |||
static CarlaString retVersion; | |||
#ifdef USING_JUCE | |||
#if defined(USING_JUCE) && !defined(BUILD_BRIDGE) | |||
if (retVersion.isEmpty()) | |||
{ | |||
if (const char* const version = CarlaJUCE::getVersion()) | |||
@@ -52,10 +52,6 @@ | |||
# include <X11/Xlib.h> | |||
#endif | |||
#ifdef USING_JUCE | |||
# include "carla_juce/carla_juce.h" | |||
#endif | |||
#include "water/files/File.h" | |||
#include "water/misc/Time.h" | |||
@@ -149,9 +145,6 @@ public: | |||
CarlaBridgePlugin(const bool useBridge, const char* const clientName, const char* const audioPoolBaseName, | |||
const char* const rtClientBaseName, const char* const nonRtClientBaseName, const char* const nonRtServerBaseName) | |||
: fEngine(nullptr), | |||
#ifdef USING_JUCE | |||
fJuceInitialiser(), | |||
#endif | |||
fUsingBridge(false), | |||
fUsingExec(false) | |||
{ | |||
@@ -231,9 +224,6 @@ public: | |||
gIsInitiated = true; | |||
#if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) | |||
CarlaJUCE::setupAndUseMainApplication(gIdle, &gCloseSignal); | |||
#else | |||
int64_t timeToEnd = 0; | |||
if (testing) | |||
@@ -245,18 +235,17 @@ public: | |||
for (; runMainLoopOnce() && ! gCloseBridge;) | |||
{ | |||
gIdle(); | |||
# if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) | |||
// MacOS and Win32 have event-loops to run, so minimize sleep time | |||
carla_msleep(1); | |||
# else | |||
#else | |||
carla_msleep(5); | |||
# endif | |||
#endif | |||
if (testing && timeToEnd - water::Time::currentTimeMillis() < 0) | |||
break; | |||
if (gCloseSignal && ! fUsingBridge) | |||
break; | |||
} | |||
#endif | |||
carla_engine_close(gHostHandle); | |||
} | |||
@@ -291,10 +280,6 @@ protected: | |||
private: | |||
CarlaEngine* fEngine; | |||
#ifdef USING_JUCE | |||
const CarlaJUCE::ScopedJuceInitialiser_GUI fJuceInitialiser; | |||
#endif | |||
bool fUsingBridge; | |||
bool fUsingExec; | |||
@@ -327,13 +327,6 @@ endif | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# arm32 | |||
ifeq ($(USING_JUCE),true) | |||
$(OBJDIR)/CarlaPluginJuce.arm32.o: $(CWD)/backend/plugin/CarlaPluginJuce.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPluginJuce.cpp (arm32 bridge)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -std=gnu++14 -c -o $@ | |||
endif | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.arm32.o: CarlaBridgePlugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (arm32 bridge)" | |||
@@ -394,20 +387,6 @@ $(OBJDIR)/CarlaStandalone.cpp.posix32.o: $(CWD)/backend/CarlaStandalone.cpp | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@ | |||
endif | |||
ifeq ($(USING_JUCE),true) | |||
ifeq ($(MACOS),true) | |||
$(OBJDIR)/CarlaPluginJuce.cpp.posix32.o: $(CWD)/backend/plugin/CarlaPluginJuce.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPluginJuce.cpp (posix32 bridge)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -ObjC++ -std=gnu++14 -c -o $@ | |||
else | |||
$(OBJDIR)/CarlaPluginJuce.cpp.posix32.o: $(CWD)/backend/plugin/CarlaPluginJuce.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPluginJuce.cpp (posix32 bridge)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -std=gnu++14 -c -o $@ | |||
endif | |||
endif | |||
$(OBJDIR)/CarlaEng%.cpp.posix32.o: $(CWD)/backend/engine/CarlaEng%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaEng$*.cpp (posix32 bridge)" | |||
@@ -458,21 +437,6 @@ $(OBJDIR)/CarlaStandalone.cpp.posix64.o: $(CWD)/backend/CarlaStandalone.cpp | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@ | |||
endif | |||
ifeq ($(USING_JUCE),true) | |||
ifeq ($(MACOS),true) | |||
$(OBJDIR)/CarlaPluginJuce.cpp.posix64.o: $(CWD)/backend/plugin/CarlaPluginJuce.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPluginJuce.cpp (posix64 bridge)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -ObjC++ -std=gnu++14 -c -o $@ | |||
else | |||
$(OBJDIR)/CarlaPluginJuce.cpp.posix64.o: $(CWD)/backend/plugin/CarlaPluginJuce.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPluginJuce.cpp (posix64 bridge)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -std=gnu++14 -c -o $@ | |||
endif | |||
endif | |||
$(OBJDIR)/CarlaEng%.cpp.posix64.o: $(CWD)/backend/engine/CarlaEng%.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaEng$*.cpp (posix64 bridge)" | |||
@@ -486,13 +450,6 @@ $(OBJDIR)/CarlaPlug%.cpp.posix64.o: $(CWD)/backend/plugin/CarlaPlug%.cpp | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# win32 | |||
ifeq ($(USING_JUCE),true) | |||
$(OBJDIR)/CarlaPluginJuce.cpp.win32.o: $(CWD)/backend/plugin/CarlaPluginJuce.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPluginJuce.cpp (win32 bridge)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -std=gnu++14 -c -o $@ | |||
endif | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.win32.o: CarlaBridgePlugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (win32 bridge)" | |||
@@ -516,13 +473,6 @@ $(OBJDIR)/CarlaPlug%.cpp.win32.o: $(CWD)/backend/plugin/CarlaPlug%.cpp | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# win64 | |||
ifeq ($(USING_JUCE),true) | |||
$(OBJDIR)/CarlaPluginJuce.cpp.win64.o: $(CWD)/backend/plugin/CarlaPluginJuce.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling CarlaPluginJuce.cpp (win64 bridge)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -std=gnu++14 -c -o $@ | |||
endif | |||
$(OBJDIR)/CarlaBridgePlugin.cpp.win64.o: CarlaBridgePlugin.cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (win64 bridge)" | |||
@@ -46,6 +46,7 @@ | |||
#ifdef BUILD_BRIDGE | |||
# undef HAVE_FLUIDSYNTH | |||
# undef HAVE_YSFX | |||
# undef USING_JUCE | |||
#endif | |||
#ifdef HAVE_FLUIDSYNTH | |||
@@ -15,24 +15,14 @@ BUILD_CXX_FLAGS += -I.. -std=gnu++14 | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
ifeq ($(MACOS),true) | |||
OBJS = $(OBJDIR)/$(MODULENAME).mm.o | |||
OBJS_posix32 = $(OBJDIR)/$(MODULENAME).mm.posix32.o | |||
OBJS_posix64 = $(OBJDIR)/$(MODULENAME).mm.posix64.o | |||
OBJS = $(OBJDIR)/$(MODULENAME).mm.o | |||
else | |||
OBJS = $(OBJDIR)/$(MODULENAME).cpp.o | |||
OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o | |||
OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o | |||
OBJS = $(OBJDIR)/$(MODULENAME).cpp.o | |||
endif | |||
OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o | |||
OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
all: $(MODULEDIR)/$(MODULENAME).a | |||
posix32: $(MODULEDIR)/$(MODULENAME).posix32.a | |||
posix64: $(MODULEDIR)/$(MODULENAME).posix64.a | |||
win32: $(MODULEDIR)/$(MODULENAME).win32.a | |||
win64: $(MODULEDIR)/$(MODULENAME).win64.a | |||
all: $(MODULEDIR)/$(MODULENAME).a | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
@@ -50,30 +40,6 @@ $(MODULEDIR)/$(MODULENAME).a: $(OBJS) | |||
$(SILENT)rm -f $@ | |||
$(SILENT)$(AR) crs $@ $^ | |||
$(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32) | |||
-@mkdir -p $(MODULEDIR) | |||
@echo "Creating $(MODULENAME).posix32.a" | |||
$(SILENT)rm -f $@ | |||
$(SILENT)$(AR) crs $@ $^ | |||
$(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64) | |||
-@mkdir -p $(MODULEDIR) | |||
@echo "Creating $(MODULENAME).posix64.a" | |||
$(SILENT)rm -f $@ | |||
$(SILENT)$(AR) crs $@ $^ | |||
$(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32) | |||
-@mkdir -p $(MODULEDIR) | |||
@echo "Creating $(MODULENAME).win32.a" | |||
$(SILENT)rm -f $@ | |||
$(SILENT)$(AR) crs $@ $^ | |||
$(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64) | |||
-@mkdir -p $(MODULEDIR) | |||
@echo "Creating $(MODULENAME).win64.a" | |||
$(SILENT)rm -f $@ | |||
$(SILENT)$(AR) crs $@ $^ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
$(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp | |||
@@ -81,16 +47,6 @@ $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp | |||
@echo "Compiling $<" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||
$(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (32bit)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@ | |||
$(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (64bit)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
$(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp | |||
@@ -98,22 +54,8 @@ $(OBJDIR)/$(MODULENAME).mm.o: $(MODULENAME).cpp | |||
@echo "Compiling $<" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@ | |||
$(OBJDIR)/$(MODULENAME).mm.%32.o: $(MODULENAME).cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (32bit)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -ObjC++ -c -o $@ | |||
$(OBJDIR)/$(MODULENAME).mm.%64.o: $(MODULENAME).cpp | |||
-@mkdir -p $(OBJDIR) | |||
@echo "Compiling $< (64bit)" | |||
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -ObjC++ -c -o $@ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
-include $(OBJS:%.o=%.d) | |||
-include $(OBJS_posix32:%.o=%.d) | |||
-include $(OBJS_posix64:%.o=%.d) | |||
-include $(OBJS_win32:%.o=%.d) | |||
-include $(OBJS_win64:%.o=%.d) | |||
# --------------------------------------------------------------------------------------------------------------------- |