@@ -24,6 +24,10 @@ | |||||
CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
#if 0 | |||||
} | |||||
#endif | |||||
class CsoundPlugin : public CarlaPlugin | class CsoundPlugin : public CarlaPlugin | ||||
{ | { | ||||
public: | public: | ||||
@@ -33,9 +37,9 @@ public: | |||||
carla_debug("CsoundPlugin::CsoundPlugin(%p, %i)", engine, id); | carla_debug("CsoundPlugin::CsoundPlugin(%p, %i)", engine, id); | ||||
} | } | ||||
~Vst3Plugin() override | |||||
~CsoundPlugin() override | |||||
{ | { | ||||
carla_debug("Vst3Plugin::~Vst3Plugin()"); | |||||
carla_debug("CsoundPlugin::~CsoundPlugin()"); | |||||
pData->singleMutex.lock(); | pData->singleMutex.lock(); | ||||
pData->masterMutex.lock(); | pData->masterMutex.lock(); | ||||
@@ -47,11 +51,20 @@ public: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Information (base) | // Information (base) | ||||
PluginType getType() const override | |||||
PluginType getType() const noexcept override | |||||
{ | { | ||||
return PLUGIN_CSOUND; | return PLUGIN_CSOUND; | ||||
} | } | ||||
void reload() override | |||||
{ | |||||
} | |||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames) override | |||||
{ | |||||
} | |||||
private: | private: | ||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CsoundPlugin) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CsoundPlugin) | ||||
}; | }; | ||||
@@ -62,7 +75,7 @@ CARLA_BACKEND_END_NAMESPACE | |||||
CARLA_BACKEND_START_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); | carla_debug("CarlaPlugin::newCsound(%p, \"%s\", \"%s\", \"%s\")", init.engine, init.filename, init.name, init.label); | ||||
@@ -24,15 +24,15 @@ | |||||
#include "CarlaEngine.hpp" | #include "CarlaEngine.hpp" | ||||
#include "CarlaPlugin.hpp" | #include "CarlaPlugin.hpp" | ||||
#include <QtCore/QDir> | |||||
#include <QtCore/QFile> | |||||
#include <QtCore/QTextStream> | |||||
//#include <QtCore/QDir> | |||||
//#include <QtCore/QFile> | |||||
//#include <QtCore/QTextStream> | |||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |||||
# include <QtWidgets/QApplication> | |||||
#else | |||||
# include <QtGui/QApplication> | |||||
#endif | |||||
//#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |||||
//# include <QtWidgets/QApplication> | |||||
//#else | |||||
//# include <QtGui/QApplication> | |||||
//#endif | |||||
#ifdef CARLA_OS_UNIX | #ifdef CARLA_OS_UNIX | ||||
# include <signal.h> | # include <signal.h> | ||||
@@ -111,13 +111,13 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
// ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
class CarlaPluginClient : public CarlaBridgeClient, | |||||
public QObject | |||||
class CarlaPluginClient : public CarlaBridgeClient/*, | |||||
public QObject*/ | |||||
{ | { | ||||
public: | public: | ||||
CarlaPluginClient(const bool useBridge, const char* const driverName, const char* audioBaseName, const char* controlBaseName) | CarlaPluginClient(const bool useBridge, const char* const driverName, const char* audioBaseName, const char* controlBaseName) | ||||
: CarlaBridgeClient(nullptr), | : CarlaBridgeClient(nullptr), | ||||
QObject(nullptr), | |||||
// QObject(nullptr), | |||||
fEngine(nullptr), | fEngine(nullptr), | ||||
fPlugin(nullptr), | fPlugin(nullptr), | ||||
fTimerId(0) | fTimerId(0) | ||||
@@ -172,7 +172,7 @@ public: | |||||
fPlugin->loadStateFromFile(fProjFileName); | fPlugin->loadStateFromFile(fProjFileName); | ||||
} | } | ||||
fTimerId = startTimer(50); | |||||
//fTimerId = startTimer(50); | |||||
} | } | ||||
void idle() | void idle() | ||||
@@ -198,15 +198,15 @@ public: | |||||
if (fTimerId != 0) | if (fTimerId != 0) | ||||
{ | { | ||||
killTimer(fTimerId); | |||||
//killTimer(fTimerId); | |||||
fTimerId = 0; | 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 (data && dataSize >= 4) | ||||
{ | { | ||||
#if 0 | |||||
QString filePath; | QString filePath; | ||||
filePath = QDir::tempPath(); | filePath = QDir::tempPath(); | ||||
#ifdef Q_OS_WIN | #ifdef Q_OS_WIN | ||||
@@ -264,6 +265,7 @@ public: | |||||
file.close(); | file.close(); | ||||
fEngine->oscSend_bridge_set_chunk_data(filePath.toUtf8().constData()); | fEngine->oscSend_bridge_set_chunk_data(filePath.toUtf8().constData()); | ||||
} | } | ||||
#endif | |||||
} | } | ||||
} | } | ||||
@@ -287,6 +289,7 @@ public: | |||||
if (fPlugin == nullptr) | if (fPlugin == nullptr) | ||||
return; | return; | ||||
#if 0 | |||||
QString chunkFilePath(filePath); | QString chunkFilePath(filePath); | ||||
#ifdef CARLA_OS_WIN | #ifdef CARLA_OS_WIN | ||||
@@ -308,6 +311,7 @@ public: | |||||
fPlugin->setChunkData(stringData.toUtf8().constData()); | fPlugin->setChunkData(stringData.toUtf8().constData()); | ||||
} | } | ||||
#endif | |||||
} | } | ||||
// --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
@@ -365,13 +369,13 @@ private: | |||||
CarlaString fProjFileName; | CarlaString fProjFileName; | ||||
int fTimerId; | 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) | 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; | return 1; | ||||
} | } | ||||
QApplication app(argc, argv, true); | |||||
app.setQuitOnLastWindowClosed(false); | |||||
//QApplication app(argc, argv, true); | |||||
//app.setQuitOnLastWindowClosed(false); | |||||
CarlaString clientName((name != nullptr) ? name : label); | CarlaString clientName((name != nullptr) ? name : label); | ||||
if (clientName.isEmpty()) | 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) | if (itype >= CarlaBackend::PLUGIN_GIG && itype <= CarlaBackend::PLUGIN_SFZ && label == nullptr) | ||||
@@ -566,7 +570,7 @@ int main(int argc, char* argv[]) | |||||
client.ready(!useOsc); | client.ready(!useOsc); | ||||
ret = app.exec(); | |||||
//ret = app.exec(); | |||||
carla_remove_plugin(0); | carla_remove_plugin(0); | ||||
} | } | ||||
@@ -22,6 +22,7 @@ DEFINES += WANT_DSSI | |||||
DEFINES += WANT_LV2 | DEFINES += WANT_LV2 | ||||
DEFINES += WANT_VST | DEFINES += WANT_VST | ||||
DEFINES += WANT_AU | DEFINES += WANT_AU | ||||
DEFINES += WANT_CSOUND | |||||
DEFINES += WANT_FLUIDSYNTH | DEFINES += WANT_FLUIDSYNTH | ||||
DEFINES += WANT_LINUXSAMPLER | DEFINES += WANT_LINUXSAMPLER | ||||
DEFINES += WANT_OPENGL | DEFINES += WANT_OPENGL | ||||
@@ -74,8 +75,9 @@ SOURCES += \ | |||||
../../backend/engine/CarlaEngineThread.cpp \ | ../../backend/engine/CarlaEngineThread.cpp \ | ||||
../../backend/engine/CarlaEngineBridge.cpp \ | ../../backend/engine/CarlaEngineBridge.cpp \ | ||||
../../backend/engine/CarlaEngineJack.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 | # Plugin | ||||
SOURCES += \ | SOURCES += \ | ||||
@@ -102,8 +104,6 @@ SOURCES += \ | |||||
HEADERS += \ | HEADERS += \ | ||||
../../backend/CarlaBackend.hpp \ | ../../backend/CarlaBackend.hpp \ | ||||
../../backend/CarlaEngine.hpp \ | ../../backend/CarlaEngine.hpp \ | ||||
../../backend/CarlaNative.h \ | |||||
../../backend/CarlaNative.hpp \ | |||||
../../backend/CarlaPlugin.hpp \ | ../../backend/CarlaPlugin.hpp \ | ||||
../../backend/CarlaHost.hpp | ../../backend/CarlaHost.hpp | ||||
@@ -111,12 +111,12 @@ HEADERS += \ | |||||
HEADERS += \ | HEADERS += \ | ||||
../../backend/engine/CarlaEngineInternal.hpp \ | ../../backend/engine/CarlaEngineInternal.hpp \ | ||||
../../backend/engine/CarlaEngineOsc.hpp \ | ../../backend/engine/CarlaEngineOsc.hpp \ | ||||
../../backend/engine/CarlaEngineThread.hpp \ | |||||
../../backend/engine/distrho/DistrhoPluginInfo.h | |||||
../../backend/engine/CarlaEngineThread.hpp | |||||
# plugin | # plugin | ||||
HEADERS += \ | HEADERS += \ | ||||
../../backend/plugin/CarlaPluginInternal.hpp \ | ../../backend/plugin/CarlaPluginInternal.hpp \ | ||||
../../backend/plugin/CarlaPluginGui.hpp \ | |||||
../../backend/plugin/CarlaPluginThread.hpp | ../../backend/plugin/CarlaPluginThread.hpp | ||||
# includes | # includes | ||||
@@ -136,11 +136,14 @@ HEADERS += \ | |||||
../../utils/CarlaUtils.hpp \ | ../../utils/CarlaUtils.hpp \ | ||||
../../utils/CarlaBackendUtils.hpp \ | ../../utils/CarlaBackendUtils.hpp \ | ||||
../../utils/CarlaBridgeUtils.hpp \ | ../../utils/CarlaBridgeUtils.hpp \ | ||||
../../utils/CarlaDssiUtils.hpp \ | |||||
../../utils/CarlaJuceUtils.hpp \ | ../../utils/CarlaJuceUtils.hpp \ | ||||
../../utils/CarlaLadspaUtils.hpp \ | ../../utils/CarlaLadspaUtils.hpp \ | ||||
../../utils/CarlaLibUtils.hpp \ | ../../utils/CarlaLibUtils.hpp \ | ||||
../../utils/CarlaLogThread.hpp \ | |||||
../../utils/CarlaLv2Utils.hpp \ | ../../utils/CarlaLv2Utils.hpp \ | ||||
../../utils/CarlaOscUtils.hpp \ | ../../utils/CarlaOscUtils.hpp \ | ||||
../../utils/CarlaPipeUtils.hpp \ | |||||
../../utils/CarlaShmUtils.hpp \ | ../../utils/CarlaShmUtils.hpp \ | ||||
../../utils/CarlaStateUtils.hpp \ | ../../utils/CarlaStateUtils.hpp \ | ||||
../../utils/CarlaVstUtils.hpp \ | ../../utils/CarlaVstUtils.hpp \ | ||||
@@ -156,17 +159,15 @@ INCLUDEPATH = .. \ | |||||
../../backend/plugin \ | ../../backend/plugin \ | ||||
../../includes \ | ../../includes \ | ||||
../../modules \ | ../../modules \ | ||||
../../modules/theme \ | |||||
../../utils | ../../utils | ||||
# ----------------------------------------------------------- | # ----------------------------------------------------------- | ||||
LIBS = -ldl | |||||
LIBS = -ldl -lpthread -lrt | |||||
LIBS += ../../modules/carla_native.a | LIBS += ../../modules/carla_native.a | ||||
LIBS += ../../modules/juce_audio_basics.a | LIBS += ../../modules/juce_audio_basics.a | ||||
LIBS += ../../modules/juce_core.a | LIBS += ../../modules/juce_core.a | ||||
LIBS += ../../modules/rtmempool.a | LIBS += ../../modules/rtmempool.a | ||||
LIBS += ../../modules/theme.a | |||||
LIBS += ../../modules/dgl.a | LIBS += ../../modules/dgl.a | ||||
LIBS += ../../modules/lilv.a | LIBS += ../../modules/lilv.a | ||||