@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2022 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 | |||
@@ -21,26 +21,26 @@ | |||
#include "CarlaBackend.h" | |||
#ifdef __cplusplus | |||
using CarlaBackend::BinaryType; | |||
using CarlaBackend::PluginType; | |||
using CarlaBackend::PluginCategory; | |||
using CarlaBackend::InternalParameterIndex; | |||
using CarlaBackend::EngineCallbackOpcode; | |||
using CarlaBackend::NsmCallbackOpcode; | |||
using CarlaBackend::EngineOption; | |||
using CarlaBackend::EngineProcessMode; | |||
using CarlaBackend::EngineTransportMode; | |||
using CarlaBackend::FileCallbackOpcode; | |||
using CarlaBackend::EngineCallbackFunc; | |||
using CarlaBackend::FileCallbackFunc; | |||
using CarlaBackend::ParameterData; | |||
using CarlaBackend::ParameterRanges; | |||
using CarlaBackend::MidiProgramData; | |||
using CarlaBackend::CustomData; | |||
using CarlaBackend::EngineDriverDeviceInfo; | |||
using CarlaBackend::CarlaEngine; | |||
using CarlaBackend::CarlaEngineClient; | |||
using CarlaBackend::CarlaPlugin; | |||
using CARLA_BACKEND_NAMESPACE::BinaryType; | |||
using CARLA_BACKEND_NAMESPACE::PluginType; | |||
using CARLA_BACKEND_NAMESPACE::PluginCategory; | |||
using CARLA_BACKEND_NAMESPACE::InternalParameterIndex; | |||
using CARLA_BACKEND_NAMESPACE::EngineCallbackOpcode; | |||
using CARLA_BACKEND_NAMESPACE::NsmCallbackOpcode; | |||
using CARLA_BACKEND_NAMESPACE::EngineOption; | |||
using CARLA_BACKEND_NAMESPACE::EngineProcessMode; | |||
using CARLA_BACKEND_NAMESPACE::EngineTransportMode; | |||
using CARLA_BACKEND_NAMESPACE::FileCallbackOpcode; | |||
using CARLA_BACKEND_NAMESPACE::EngineCallbackFunc; | |||
using CARLA_BACKEND_NAMESPACE::FileCallbackFunc; | |||
using CARLA_BACKEND_NAMESPACE::ParameterData; | |||
using CARLA_BACKEND_NAMESPACE::ParameterRanges; | |||
using CARLA_BACKEND_NAMESPACE::MidiProgramData; | |||
using CARLA_BACKEND_NAMESPACE::CustomData; | |||
using CARLA_BACKEND_NAMESPACE::EngineDriverDeviceInfo; | |||
using CARLA_BACKEND_NAMESPACE::CarlaEngine; | |||
using CARLA_BACKEND_NAMESPACE::CarlaEngineClient; | |||
using CARLA_BACKEND_NAMESPACE::CarlaPlugin; | |||
#endif | |||
/*! | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2021 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2022 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 | |||
@@ -28,7 +28,7 @@ | |||
# include "CarlaLogThread.hpp" | |||
#endif | |||
namespace CB = CarlaBackend; | |||
namespace CB = CARLA_BACKEND_NAMESPACE; | |||
using CB::EngineOptions; | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
@@ -146,7 +146,7 @@ void _CarlaTransportInfo::clear() noexcept | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
using CarlaBackend::CarlaPluginPtr; | |||
using CARLA_BACKEND_NAMESPACE::CarlaPluginPtr; | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
@@ -21,8 +21,8 @@ | |||
#include "CarlaBackend.h" | |||
#ifdef __cplusplus | |||
using CarlaBackend::PluginCategory; | |||
using CarlaBackend::PluginType; | |||
using CARLA_BACKEND_NAMESPACE::PluginCategory; | |||
using CARLA_BACKEND_NAMESPACE::PluginType; | |||
#endif | |||
/*! | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2022 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 | |||
@@ -459,7 +459,7 @@ public: | |||
const char* getCurrentDriverName() const noexcept override | |||
{ | |||
return CarlaBackend::getRtAudioApiName(fAudio.getCurrentApi()); | |||
return CARLA_BACKEND_NAMESPACE::getRtAudioApiName(fAudio.getCurrentApi()); | |||
} | |||
// ------------------------------------------------------------------- | |||
@@ -1192,7 +1192,7 @@ const char* getRtAudioApiName(const uint index) | |||
CARLA_SAFE_ASSERT_RETURN(index < gRtAudioApis.size(), nullptr); | |||
return CarlaBackend::getRtAudioApiName(gRtAudioApis[index]); | |||
return CARLA_BACKEND_NAMESPACE::getRtAudioApiName(gRtAudioApis[index]); | |||
} | |||
const char* const* getRtAudioApiDeviceNames(const uint index) | |||
@@ -379,7 +379,7 @@ protected: | |||
"Saving now will lose its current settings.\n" | |||
"Please remove this plugin, and not rely on it from this point."); | |||
kEngine->callback(true, true, | |||
CarlaBackend::ENGINE_CALLBACK_ERROR, kPlugin->getId(), 0, 0, 0, 0.0f, errorString); | |||
ENGINE_CALLBACK_ERROR, kPlugin->getId(), 0, 0, 0, 0.0f, errorString); | |||
} | |||
} | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2022 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 | |||
@@ -30,7 +30,7 @@ | |||
#include "water/containers/Array.h" | |||
#include "water/files/File.h" | |||
namespace CB = CarlaBackend; | |||
namespace CB = CARLA_BACKEND_NAMESPACE; | |||
// ------------------------------------------------------------------------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2022 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 | |||
@@ -19,7 +19,7 @@ | |||
#include "CarlaPipeUtils.hpp" | |||
namespace CB = CarlaBackend; | |||
namespace CB = CARLA_BACKEND_NAMESPACE; | |||
// ------------------------------------------------------------------------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2021 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2022 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 | |||
@@ -28,7 +28,7 @@ | |||
# include <X11/Xresource.h> | |||
#endif | |||
namespace CB = CarlaBackend; | |||
namespace CB = CARLA_BACKEND_NAMESPACE; | |||
// ------------------------------------------------------------------------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Bridge Plugin | |||
* Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2022 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 | |||
@@ -75,10 +75,10 @@ | |||
#include "water/files/File.h" | |||
#include "water/misc/Time.h" | |||
using CarlaBackend::CarlaEngine; | |||
using CarlaBackend::EngineCallbackOpcode; | |||
using CarlaBackend::EngineCallbackOpcode2Str; | |||
using CarlaBackend::runMainLoopOnce; | |||
using CARLA_BACKEND_NAMESPACE::CarlaEngine; | |||
using CARLA_BACKEND_NAMESPACE::EngineCallbackOpcode; | |||
using CARLA_BACKEND_NAMESPACE::EngineCallbackOpcode2Str; | |||
using CARLA_BACKEND_NAMESPACE::runMainLoopOnce; | |||
using water::CharPointer_UTF8; | |||
using water::File; | |||
@@ -372,8 +372,8 @@ private: | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// pluginId must be 0 (first), except for patchbay things | |||
if (action < CarlaBackend::ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED || | |||
action > CarlaBackend::ENGINE_CALLBACK_PATCHBAY_CONNECTION_REMOVED) | |||
if (action < CARLA_BACKEND_NAMESPACE::ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED || | |||
action > CARLA_BACKEND_NAMESPACE::ENGINE_CALLBACK_PATCHBAY_CONNECTION_REMOVED) | |||
#endif | |||
{ | |||
CARLA_SAFE_ASSERT_UINT_RETURN(pluginId == 0, pluginId,); | |||
@@ -426,12 +426,12 @@ int main(int argc, char* argv[]) | |||
// --------------------------------------------------------------------- | |||
// Check binary type | |||
CarlaBackend::BinaryType btype = CarlaBackend::BINARY_NATIVE; | |||
CARLA_BACKEND_NAMESPACE::BinaryType btype = CARLA_BACKEND_NAMESPACE::BINARY_NATIVE; | |||
if (const char* const binaryTypeStr = std::getenv("CARLA_BRIDGE_PLUGIN_BINARY_TYPE")) | |||
btype = CarlaBackend::getBinaryTypeFromString(binaryTypeStr); | |||
btype = CARLA_BACKEND_NAMESPACE::getBinaryTypeFromString(binaryTypeStr); | |||
if (btype == CarlaBackend::BINARY_NONE) | |||
if (btype == CARLA_BACKEND_NAMESPACE::BINARY_NONE) | |||
{ | |||
carla_stderr("Invalid binary type '%i'", btype); | |||
return 1; | |||
@@ -440,9 +440,9 @@ int main(int argc, char* argv[]) | |||
// --------------------------------------------------------------------- | |||
// Check plugin type | |||
CarlaBackend::PluginType itype(CarlaBackend::getPluginTypeFromString(stype)); | |||
CARLA_BACKEND_NAMESPACE::PluginType itype = CARLA_BACKEND_NAMESPACE::getPluginTypeFromString(stype); | |||
if (itype == CarlaBackend::PLUGIN_NONE) | |||
if (itype == CARLA_BACKEND_NAMESPACE::PLUGIN_NONE) | |||
{ | |||
carla_stderr("Invalid plugin type '%s'", stype); | |||
return 1; | |||
@@ -507,7 +507,7 @@ int main(int argc, char* argv[]) | |||
{ | |||
clientName = name; | |||
} | |||
else if (itype == CarlaBackend::PLUGIN_LV2) | |||
else if (itype == CARLA_BACKEND_NAMESPACE::PLUGIN_LV2) | |||
{ | |||
// LV2 requires URI | |||
CARLA_SAFE_ASSERT_RETURN(label != nullptr && label[0] != '\0', 1); | |||
@@ -573,7 +573,7 @@ int main(int argc, char* argv[]) | |||
const void* extraStuff = nullptr; | |||
if (itype == CarlaBackend::PLUGIN_SF2) | |||
if (itype == CARLA_BACKEND_NAMESPACE::PLUGIN_SF2) | |||
{ | |||
if (label == nullptr) | |||
label = clientName; | |||
@@ -589,7 +589,7 @@ int main(int argc, char* argv[]) | |||
const bool testing = std::getenv("CARLA_BRIDGE_TESTING") != nullptr; | |||
#ifdef CARLA_OS_MAC | |||
CarlaBackend::initStandaloneApplication(); | |||
CARLA_BACKEND_NAMESPACE::initStandaloneApplication(); | |||
#endif | |||
#ifdef CARLA_OS_WIN | |||
@@ -668,7 +668,7 @@ int main(int argc, char* argv[]) | |||
if (std::getenv("DISPLAY") != nullptr) | |||
#endif | |||
carla_set_engine_option(gHostHandle, | |||
CarlaBackend::ENGINE_OPTION_FRONTEND_UI_SCALE, | |||
CARLA_BACKEND_NAMESPACE::ENGINE_OPTION_FRONTEND_UI_SCALE, | |||
static_cast<int>(carla_get_desktop_scale_factor()*1000+0.5), | |||
nullptr); | |||
} | |||
@@ -678,25 +678,26 @@ int main(int argc, char* argv[]) | |||
if (carla_add_plugin(gHostHandle, | |||
btype, itype, | |||
file.getFullPathName().toRawUTF8(), name, label, uniqueId, extraStuff, CarlaBackend::PLUGIN_OPTIONS_NULL)) | |||
file.getFullPathName().toRawUTF8(), name, label, uniqueId, extraStuff, | |||
CARLA_BACKEND_NAMESPACE::PLUGIN_OPTIONS_NULL)) | |||
{ | |||
ret = 0; | |||
if (! useBridge) | |||
{ | |||
carla_set_active(gHostHandle, 0, true); | |||
carla_set_engine_option(gHostHandle, CarlaBackend::ENGINE_OPTION_PLUGINS_ARE_STANDALONE, 1, nullptr); | |||
carla_set_engine_option(gHostHandle, CARLA_BACKEND_NAMESPACE::ENGINE_OPTION_PLUGINS_ARE_STANDALONE, 1, nullptr); | |||
if (const CarlaPluginInfo* const pluginInfo = carla_get_plugin_info(gHostHandle, 0)) | |||
{ | |||
if (itype == CarlaBackend::PLUGIN_INTERNAL && (std::strcmp(label, "audiofile") == 0 || std::strcmp(label, "midifile") == 0)) | |||
if (itype == CARLA_BACKEND_NAMESPACE::PLUGIN_INTERNAL && (std::strcmp(label, "audiofile") == 0 || std::strcmp(label, "midifile") == 0)) | |||
{ | |||
if (file.exists()) | |||
carla_set_custom_data(gHostHandle, 0, | |||
CarlaBackend::CUSTOM_DATA_TYPE_STRING, | |||
CARLA_BACKEND_NAMESPACE::CUSTOM_DATA_TYPE_STRING, | |||
"file", file.getFullPathName().toRawUTF8()); | |||
} | |||
else if (pluginInfo->hints & CarlaBackend::PLUGIN_HAS_CUSTOM_UI) | |||
else if (pluginInfo->hints & CARLA_BACKEND_NAMESPACE::PLUGIN_HAS_CUSTOM_UI) | |||
{ | |||
#ifdef HAVE_X11 | |||
if (std::getenv("DISPLAY") != nullptr) | |||
@@ -707,8 +708,8 @@ int main(int argc, char* argv[]) | |||
// on standalone usage, enable everything that makes sense | |||
const uint optsAvailable = pluginInfo->optionsAvailable; | |||
if (optsAvailable & CarlaBackend::PLUGIN_OPTION_FIXED_BUFFERS) | |||
carla_set_option(gHostHandle, 0, CarlaBackend::PLUGIN_OPTION_FIXED_BUFFERS, true); | |||
if (optsAvailable & CARLA_BACKEND_NAMESPACE::PLUGIN_OPTION_FIXED_BUFFERS) | |||
carla_set_option(gHostHandle, 0, CARLA_BACKEND_NAMESPACE::PLUGIN_OPTION_FIXED_BUFFERS, true); | |||
} | |||
} | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla LV2 Single Plugin | |||
* Copyright (C) 2017-2020 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2017-2022 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 | |||
@@ -48,7 +48,7 @@ | |||
#include "water/files/File.h" | |||
template<> | |||
void Lv2PluginBaseClass<CarlaBackend::EngineTimeInfo>::clearTimeData() noexcept | |||
void Lv2PluginBaseClass<CARLA_BACKEND_NAMESPACE::EngineTimeInfo>::clearTimeData() noexcept | |||
{ | |||
fLastPositionData.clear(); | |||
fTimeInfo.clear(); | |||
@@ -566,7 +566,7 @@ private: | |||
CARLA_BACKEND_END_NAMESPACE | |||
using CarlaBackend::CarlaEngineSingleLV2; | |||
using CARLA_BACKEND_NAMESPACE::CarlaEngineSingleLV2; | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
// LV2 DSP functions | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Bridge UI | |||
* Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2022 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 | |||
@@ -521,7 +521,7 @@ public: | |||
#ifdef CARLA_OS_MAC | |||
// Binary might be in quarentine due to Apple stupid notarization rules, let's remove that if possible | |||
CarlaBackend::removeFileFromQuarantine(fRdfUiDescriptor->Binary); | |||
CARLA_BACKEND_NAMESPACE::removeFileFromQuarantine(fRdfUiDescriptor->Binary); | |||
#endif | |||
if (! libOpen(fRdfUiDescriptor->Binary)) | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Bridge UI | |||
* Copyright (C) 2014-2021 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2014-2022 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 | |||
@@ -32,7 +32,7 @@ | |||
CARLA_BRIDGE_UI_START_NAMESPACE | |||
using CarlaBackend::runMainLoopOnce; | |||
using CARLA_BACKEND_NAMESPACE::runMainLoopOnce; | |||
// ------------------------------------------------------------------------- | |||
@@ -62,7 +62,7 @@ public: | |||
const CarlaBridgeFormat::Options& options(fPlugin->getOptions()); | |||
#if defined(CARLA_OS_MAC) && defined(BRIDGE_COCOA) | |||
CarlaBackend::initStandaloneApplication(); | |||
CARLA_BACKEND_NAMESPACE::initStandaloneApplication(); | |||
fHostUI = CarlaPluginUI::newCocoa(this, 0, options.isStandalone, options.isResizable); | |||
#elif defined(CARLA_OS_WIN) && defined(BRIDGE_HWND) | |||
fHostUI = CarlaPluginUI::newWindows(this, 0, options.isStandalone, options.isResizable); | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2020 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2022 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 | |||
@@ -79,8 +79,8 @@ CARLA_EXPORT void carla_host_handle_free(CarlaHostHandle handle); | |||
* Get the internal CarlaEngine instance. | |||
* @deprecated Please use carla_create_native_plugin_host_handle instead | |||
*/ | |||
CARLA_EXPORT CarlaBackend::CarlaEngine* carla_get_native_plugin_engine(const NativePluginDescriptor* desc, | |||
NativePluginHandle handle); | |||
CARLA_EXPORT CARLA_BACKEND_NAMESPACE::CarlaEngine* carla_get_native_plugin_engine(const NativePluginDescriptor* desc, | |||
NativePluginHandle handle); | |||
#endif | |||
#endif /* CARLA_NATIVE_PLUGIN_H_INCLUDED */ |
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla JACK API for external applications | |||
* Copyright (C) 2016-2019 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2016-2022 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 | |||
@@ -1444,8 +1444,8 @@ CARLA_BACKEND_END_NAMESPACE | |||
// --------------------------------------------------------------------------------------------------------------------- | |||
using CarlaBackend::CarlaJackAppClient; | |||
using CarlaBackend::JackClientState; | |||
using CARLA_BACKEND_NAMESPACE::CarlaJackAppClient; | |||
using CARLA_BACKEND_NAMESPACE::JackClientState; | |||
static CarlaJackAppClient gClient; | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Log Thread | |||
* Copyright (C) 2013-2019 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2013-2022 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 | |||
@@ -30,7 +30,7 @@ | |||
# define _dup2(f1,f2) dup2(f1,f2) | |||
#endif | |||
using CarlaBackend::EngineCallbackFunc; | |||
using CARLA_BACKEND_NAMESPACE::EngineCallbackFunc; | |||
// ----------------------------------------------------------------------- | |||
// Log thread | |||
@@ -176,7 +176,7 @@ protected: | |||
bufTemp[0] = '\0'; | |||
bufTempPos = 0; | |||
fCallback(fCallbackPtr, CarlaBackend::ENGINE_CALLBACK_DEBUG, 0, 0, 0, 0, 0.0f, bufSend); | |||
fCallback(fCallbackPtr, CARLA_BACKEND_NAMESPACE::ENGINE_CALLBACK_DEBUG, 0, 0, 0, 0, 0.0f, bufSend); | |||
} | |||
if (lastRead > 0 && lastRead != r) | |||
@@ -626,7 +626,7 @@ public: | |||
fWindow(nullptr) | |||
{ | |||
carla_debug("CocoaPluginUI::CocoaPluginUI(%p, " P_UINTPTR, "%s)", callback, parentId, bool2str(isResizable)); | |||
const CarlaBackend::AutoNSAutoreleasePool arp; | |||
const CARLA_BACKEND_NAMESPACE::AutoNSAutoreleasePool arp; | |||
[NSApplication sharedApplication]; | |||
fView = [[NSView new]retain]; | |||