diff --git a/source/backend/plugin/CsoundPlugin.cpp b/source/backend/plugin/CsoundPlugin.cpp index 6f47eacae..894e8ccc2 100644 --- a/source/backend/plugin/CsoundPlugin.cpp +++ b/source/backend/plugin/CsoundPlugin.cpp @@ -24,6 +24,10 @@ CARLA_BACKEND_START_NAMESPACE +#if 0 +} +#endif + class CsoundPlugin : public CarlaPlugin { public: @@ -33,9 +37,9 @@ public: carla_debug("CsoundPlugin::CsoundPlugin(%p, %i)", engine, id); } - ~Vst3Plugin() override + ~CsoundPlugin() override { - carla_debug("Vst3Plugin::~Vst3Plugin()"); + carla_debug("CsoundPlugin::~CsoundPlugin()"); pData->singleMutex.lock(); pData->masterMutex.lock(); @@ -47,11 +51,20 @@ public: // ------------------------------------------------------------------- // Information (base) - PluginType getType() const override + PluginType getType() const noexcept override { return PLUGIN_CSOUND; } + void reload() override + { + } + + void process(float** const inBuffer, float** const outBuffer, const uint32_t frames) override + { + + } + private: CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CsoundPlugin) }; @@ -62,7 +75,7 @@ CARLA_BACKEND_END_NAMESPACE CARLA_BACKEND_START_NAMESPACE -CarlaPlugin* CarlaPlugin::newCsound(const Initializer& init) +CarlaPlugin* CarlaPlugin::newCSOUND(const Initializer& init) { carla_debug("CarlaPlugin::newCsound(%p, \"%s\", \"%s\", \"%s\")", init.engine, init.filename, init.name, init.label); diff --git a/source/bridges/CarlaBridgePlugin.cpp b/source/bridges/CarlaBridgePlugin.cpp index c02728ebf..03bf07aa6 100644 --- a/source/bridges/CarlaBridgePlugin.cpp +++ b/source/bridges/CarlaBridgePlugin.cpp @@ -24,15 +24,15 @@ #include "CarlaEngine.hpp" #include "CarlaPlugin.hpp" -#include -#include -#include +//#include +//#include +//#include -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) -# include -#else -# include -#endif +//#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) +//# include +//#else +//# include +//#endif #ifdef CARLA_OS_UNIX # include @@ -111,13 +111,13 @@ CARLA_BRIDGE_START_NAMESPACE // ------------------------------------------------------------------------- -class CarlaPluginClient : public CarlaBridgeClient, - public QObject +class CarlaPluginClient : public CarlaBridgeClient/*, + public QObject*/ { public: CarlaPluginClient(const bool useBridge, const char* const driverName, const char* audioBaseName, const char* controlBaseName) : CarlaBridgeClient(nullptr), - QObject(nullptr), +// QObject(nullptr), fEngine(nullptr), fPlugin(nullptr), fTimerId(0) @@ -172,7 +172,7 @@ public: fPlugin->loadStateFromFile(fProjFileName); } - fTimerId = startTimer(50); + //fTimerId = startTimer(50); } void idle() @@ -198,15 +198,15 @@ public: if (fTimerId != 0) { - killTimer(fTimerId); + //killTimer(fTimerId); fTimerId = 0; } - if (QApplication* const app = qApp) - { - if (! app->closingDown()) - app->quit(); - } +// if (QApplication* const app = qApp) +// { +// if (! app->closingDown()) +// app->quit(); +// } } } @@ -246,6 +246,7 @@ public: if (data && dataSize >= 4) { +#if 0 QString filePath; filePath = QDir::tempPath(); #ifdef Q_OS_WIN @@ -264,6 +265,7 @@ public: file.close(); fEngine->oscSend_bridge_set_chunk_data(filePath.toUtf8().constData()); } +#endif } } @@ -287,6 +289,7 @@ public: if (fPlugin == nullptr) return; +#if 0 QString chunkFilePath(filePath); #ifdef CARLA_OS_WIN @@ -308,6 +311,7 @@ public: fPlugin->setChunkData(stringData.toUtf8().constData()); } +#endif } // --------------------------------------------------------------------- @@ -365,13 +369,13 @@ private: CarlaString fProjFileName; int fTimerId; - void timerEvent(QTimerEvent* const event) - { - if (event->timerId() == fTimerId) - idle(); +// void timerEvent(QTimerEvent* const event) +// { +// if (event->timerId() == fTimerId) +// idle(); - QObject::timerEvent(event); - } +// QObject::timerEvent(event); +// } static void callback(void* ptr, CarlaBackend::CallbackType action, unsigned int pluginId, int value1, int value2, float value3, const char* valueStr) { @@ -519,15 +523,15 @@ int main(int argc, char* argv[]) return 1; } - QApplication app(argc, argv, true); - app.setQuitOnLastWindowClosed(false); + //QApplication app(argc, argv, true); + //app.setQuitOnLastWindowClosed(false); CarlaString clientName((name != nullptr) ? name : label); if (clientName.isEmpty()) { - QFileInfo fileinfo(filename); - clientName = fileinfo.baseName().toUtf8().constData(); + //QFileInfo fileinfo(filename); + //clientName = fileinfo.baseName().toUtf8().constData(); } if (itype >= CarlaBackend::PLUGIN_GIG && itype <= CarlaBackend::PLUGIN_SFZ && label == nullptr) @@ -566,7 +570,7 @@ int main(int argc, char* argv[]) client.ready(!useOsc); - ret = app.exec(); + //ret = app.exec(); carla_remove_plugin(0); } diff --git a/source/bridges/qtcreator/carla-bridge-plugin.pro b/source/bridges/qtcreator/carla-bridge-plugin.pro index ce94f13e9..c310bf6e5 100644 --- a/source/bridges/qtcreator/carla-bridge-plugin.pro +++ b/source/bridges/qtcreator/carla-bridge-plugin.pro @@ -22,6 +22,7 @@ DEFINES += WANT_DSSI DEFINES += WANT_LV2 DEFINES += WANT_VST DEFINES += WANT_AU +DEFINES += WANT_CSOUND DEFINES += WANT_FLUIDSYNTH DEFINES += WANT_LINUXSAMPLER DEFINES += WANT_OPENGL @@ -74,8 +75,9 @@ SOURCES += \ ../../backend/engine/CarlaEngineThread.cpp \ ../../backend/engine/CarlaEngineBridge.cpp \ ../../backend/engine/CarlaEngineJack.cpp \ - ../../backend/engine/CarlaEngineJuce.cpp \ - ../../backend/engine/CarlaEngineRtAudio.cpp + ../../backend/engine/CarlaEngineNative.cpp +# ../../backend/engine/CarlaEngineJuce.cpp \ +# ../../backend/engine/CarlaEngineRtAudio.cpp # Plugin SOURCES += \ @@ -102,8 +104,6 @@ SOURCES += \ HEADERS += \ ../../backend/CarlaBackend.hpp \ ../../backend/CarlaEngine.hpp \ - ../../backend/CarlaNative.h \ - ../../backend/CarlaNative.hpp \ ../../backend/CarlaPlugin.hpp \ ../../backend/CarlaHost.hpp @@ -111,12 +111,12 @@ HEADERS += \ HEADERS += \ ../../backend/engine/CarlaEngineInternal.hpp \ ../../backend/engine/CarlaEngineOsc.hpp \ - ../../backend/engine/CarlaEngineThread.hpp \ - ../../backend/engine/distrho/DistrhoPluginInfo.h + ../../backend/engine/CarlaEngineThread.hpp # plugin HEADERS += \ ../../backend/plugin/CarlaPluginInternal.hpp \ + ../../backend/plugin/CarlaPluginGui.hpp \ ../../backend/plugin/CarlaPluginThread.hpp # includes @@ -136,11 +136,14 @@ HEADERS += \ ../../utils/CarlaUtils.hpp \ ../../utils/CarlaBackendUtils.hpp \ ../../utils/CarlaBridgeUtils.hpp \ + ../../utils/CarlaDssiUtils.hpp \ ../../utils/CarlaJuceUtils.hpp \ ../../utils/CarlaLadspaUtils.hpp \ ../../utils/CarlaLibUtils.hpp \ + ../../utils/CarlaLogThread.hpp \ ../../utils/CarlaLv2Utils.hpp \ ../../utils/CarlaOscUtils.hpp \ + ../../utils/CarlaPipeUtils.hpp \ ../../utils/CarlaShmUtils.hpp \ ../../utils/CarlaStateUtils.hpp \ ../../utils/CarlaVstUtils.hpp \ @@ -156,17 +159,15 @@ INCLUDEPATH = .. \ ../../backend/plugin \ ../../includes \ ../../modules \ - ../../modules/theme \ ../../utils # ----------------------------------------------------------- -LIBS = -ldl +LIBS = -ldl -lpthread -lrt LIBS += ../../modules/carla_native.a LIBS += ../../modules/juce_audio_basics.a LIBS += ../../modules/juce_core.a LIBS += ../../modules/rtmempool.a -LIBS += ../../modules/theme.a LIBS += ../../modules/dgl.a LIBS += ../../modules/lilv.a