@@ -1,6 +1,6 @@ | |||||
/* | /* | ||||
* Carla Plugin Host | * Carla Plugin Host | ||||
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
* Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||||
* | * | ||||
* This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
* modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||
@@ -501,7 +501,12 @@ typedef enum { | |||||
/*! | /*! | ||||
* SFZ file. | * SFZ file. | ||||
*/ | */ | ||||
PLUGIN_SFZ = 10 | |||||
PLUGIN_SFZ = 10, | |||||
/*! | |||||
* JACK application. | |||||
*/ | |||||
PLUGIN_JACK = 11 | |||||
} PluginType; | } PluginType; | ||||
@@ -903,6 +903,8 @@ public: | |||||
static CarlaPlugin* newFileGIG(const Initializer& init, const bool use16Outs); | static CarlaPlugin* newFileGIG(const Initializer& init, const bool use16Outs); | ||||
static CarlaPlugin* newFileSF2(const Initializer& init, const bool use16Outs); | static CarlaPlugin* newFileSF2(const Initializer& init, const bool use16Outs); | ||||
static CarlaPlugin* newFileSFZ(const Initializer& init); | static CarlaPlugin* newFileSFZ(const Initializer& init); | ||||
static CarlaPlugin* newJackApp(const Initializer& init); | |||||
#endif | #endif | ||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
@@ -638,6 +638,12 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
case PLUGIN_SFZ: | case PLUGIN_SFZ: | ||||
plugin = CarlaPlugin::newFileSFZ(initializer); | plugin = CarlaPlugin::newFileSFZ(initializer); | ||||
break; | break; | ||||
case PLUGIN_JACK: | |||||
#ifndef BUILD_BRIDGE | |||||
plugin = CarlaPlugin::newJackApp(initializer); | |||||
#endif | |||||
break; | |||||
} | } | ||||
} | } | ||||
@@ -587,7 +587,7 @@ public: | |||||
const bool wasFirstIdle(fFirstIdle); | const bool wasFirstIdle(fFirstIdle); | ||||
if (fFirstIdle) | |||||
if (wasFirstIdle) | |||||
{ | { | ||||
fFirstIdle = false; | fFirstIdle = false; | ||||
fLastPingTime = Time::currentTimeMillis(); | fLastPingTime = Time::currentTimeMillis(); | ||||
@@ -0,0 +1,45 @@ | |||||
/* | |||||
* Carla JACK Plugin | |||||
* Copyright (C) 2017 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 "CarlaPlugin.hpp" | |||||
#include "CarlaEngine.hpp" | |||||
#include "CarlaUtils.hpp" | |||||
#ifdef BUILD_BRIDGE | |||||
# error This file should not be used under bridge mode | |||||
#endif | |||||
CARLA_BACKEND_START_NAMESPACE | |||||
// ------------------------------------------------------------------------------------------------------------------- | |||||
CarlaPlugin* CarlaPlugin::newJackApp(const Initializer& init) | |||||
{ | |||||
carla_debug("CarlaPlugin::newVST3({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId); | |||||
#ifdef CARLA_OS_LINUX | |||||
init.engine->setLastError("JACK application support not implemented yet"); | |||||
return nullptr; | |||||
#else | |||||
init.engine->setLastError("JACK application support not available"); | |||||
return nullptr; | |||||
#endif | |||||
} | |||||
// ------------------------------------------------------------------------------------------------------------------- | |||||
CARLA_BACKEND_END_NAMESPACE |
@@ -22,7 +22,8 @@ OBJS = \ | |||||
$(OBJDIR)/CarlaPluginAU.cpp.o \ | $(OBJDIR)/CarlaPluginAU.cpp.o \ | ||||
$(OBJDIR)/CarlaPluginJuce.cpp.o \ | $(OBJDIR)/CarlaPluginJuce.cpp.o \ | ||||
$(OBJDIR)/CarlaPluginFluidSynth.cpp.o \ | $(OBJDIR)/CarlaPluginFluidSynth.cpp.o \ | ||||
$(OBJDIR)/CarlaPluginLinuxSampler.cpp.o | |||||
$(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \ | |||||
$(OBJDIR)/CarlaPluginJack.cpp.o | |||||
TARGETS = \ | TARGETS = \ | ||||
$(MODULEDIR)/carla_plugin.a | $(MODULEDIR)/carla_plugin.a | ||||
@@ -2,7 +2,7 @@ | |||||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
# Carla Backend code | # Carla Backend code | ||||
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
# Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||||
# | # | ||||
# This program is free software; you can redistribute it and/or | # This program is free software; you can redistribute it and/or | ||||
# modify it under the terms of the GNU General Public License as | # modify it under the terms of the GNU General Public License as | ||||
@@ -400,6 +400,9 @@ PLUGIN_SF2 = 9 | |||||
# SFZ file. | # SFZ file. | ||||
PLUGIN_SFZ = 10 | PLUGIN_SFZ = 10 | ||||
# JACK application. | |||||
PLUGIN_JACK = 11 | |||||
# ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
# Plugin Category | # Plugin Category | ||||
# Plugin category, which describes the functionality of a plugin. | # Plugin category, which describes the functionality of a plugin. | ||||
@@ -106,6 +106,8 @@ const char* PluginType2Str(const PluginType type) noexcept | |||||
return "PLUGIN_SF2"; | return "PLUGIN_SF2"; | ||||
case PLUGIN_SFZ: | case PLUGIN_SFZ: | ||||
return "PLUGIN_SFZ"; | return "PLUGIN_SFZ"; | ||||
case PLUGIN_JACK: | |||||
return "PLUGIN_JACK"; | |||||
} | } | ||||
carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type); | carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type); | ||||
@@ -478,6 +480,8 @@ const char* getPluginTypeAsString(const PluginType type) noexcept | |||||
return "SF2"; | return "SF2"; | ||||
case PLUGIN_SFZ: | case PLUGIN_SFZ: | ||||
return "SFZ"; | return "SFZ"; | ||||
case PLUGIN_JACK: | |||||
return "JACK"; | |||||
} | } | ||||
carla_stderr("CarlaBackend::getPluginTypeAsString(%i) - invalid type", type); | carla_stderr("CarlaBackend::getPluginTypeAsString(%i) - invalid type", type); | ||||
@@ -519,6 +523,8 @@ PluginType getPluginTypeFromString(const char* const ctype) noexcept | |||||
return PLUGIN_SF2; | return PLUGIN_SF2; | ||||
if (stype == "sfz") | if (stype == "sfz") | ||||
return PLUGIN_SFZ; | return PLUGIN_SFZ; | ||||
if (stype == "jack") | |||||
return PLUGIN_JACK; | |||||
carla_stderr("CarlaBackend::getPluginTypeFromString(\"%s\") - invalid string type", ctype); | carla_stderr("CarlaBackend::getPluginTypeFromString(\"%s\") - invalid string type", ctype); | ||||
return PLUGIN_NONE; | return PLUGIN_NONE; | ||||
@@ -537,6 +537,9 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const | |||||
case PLUGIN_SFZ: | case PLUGIN_SFZ: | ||||
infoXml << " <Filename>" << xmlSafeString(binary, true) << "</Filename>\n"; | infoXml << " <Filename>" << xmlSafeString(binary, true) << "</Filename>\n"; | ||||
break; | break; | ||||
case PLUGIN_JACK: | |||||
infoXml << " <Filename>" << xmlSafeString(binary, true) << "</Filename>\n"; | |||||
break; | |||||
} | } | ||||
infoXml << " </Info>\n\n"; | infoXml << " </Info>\n\n"; | ||||