diff --git a/source/backend/CarlaEngine.hpp b/source/backend/CarlaEngine.hpp
index f8df55d81..22ae6867f 100644
--- a/source/backend/CarlaEngine.hpp
+++ b/source/backend/CarlaEngine.hpp
@@ -743,6 +743,13 @@ public:
// -------------------------------------------------------------------
// Project management
+ /*!
+ * Load \a filename of any type.\n
+ * This will try to load a generic file as a plugin,
+ * either by direct handling (GIG, SF2 and SFZ) or by using an internal plugin (Audio and MIDI)
+ */
+ bool loadFilename(const char* const filename);
+
/*!
* Load \a filename session.
* \note Already loaded plugins are not removed; call removeAllPlugins() first if needed.
diff --git a/source/backend/CarlaStandalone.hpp b/source/backend/CarlaStandalone.hpp
index ec3a13c3a..fe78c5b6a 100644
--- a/source/backend/CarlaStandalone.hpp
+++ b/source/backend/CarlaStandalone.hpp
@@ -185,6 +185,7 @@ CARLA_EXPORT const char* carla_get_supported_file_types();
CARLA_EXPORT unsigned int carla_get_engine_driver_count();
CARLA_EXPORT const char* carla_get_engine_driver_name(unsigned int index);
+CARLA_EXPORT const void* carla_get_engine_driver_options(unsigned int index); // TODO
CARLA_EXPORT unsigned int carla_get_internal_plugin_count();
CARLA_EXPORT const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int internalPluginId);
@@ -197,6 +198,7 @@ CARLA_EXPORT void carla_set_engine_about_to_close();
CARLA_EXPORT void carla_set_engine_callback(CarlaCallbackFunc func, void* ptr);
CARLA_EXPORT void carla_set_engine_option(CarlaOptionsType option, int value, const char* valueStr);
+CARLA_EXPORT bool carla_load_filename(const char* filename);
CARLA_EXPORT bool carla_load_project(const char* filename);
CARLA_EXPORT bool carla_save_project(const char* filename);
@@ -214,6 +216,9 @@ CARLA_EXPORT bool carla_add_plugin(CarlaBinaryType btype, CarlaPluginType ptype,
CARLA_EXPORT bool carla_remove_plugin(unsigned int pluginId);
CARLA_EXPORT void carla_remove_all_plugins();
+CARLA_EXPORT bool carla_clone_plugin(unsigned int pluginId);
+CARLA_EXPORT bool carla_switch_plugins(unsigned int pluginIdA, unsigned int pluginIdB);
+
CARLA_EXPORT bool carla_load_plugin_state(unsigned int pluginId, const char* filename);
CARLA_EXPORT bool carla_save_plugin_state(unsigned int pluginId, const char* filename);
diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp
index 9e9fe2b42..6c71dfff6 100644
--- a/source/backend/engine/CarlaEngine.cpp
+++ b/source/backend/engine/CarlaEngine.cpp
@@ -983,15 +983,18 @@ const char* CarlaEngine::getNewUniquePluginName(const char* const name)
return (const char*)sname;
}
-#if 0
-void CarlaEngine::__bridgePluginRegister(const unsigned short id, CarlaPlugin* const plugin)
+// -----------------------------------------------------------------------
+// Project management
+
+bool CarlaEngine::loadFilename(const char* const filename)
{
- data->carlaPlugins[id] = plugin;
-}
-#endif
+ carla_debug("CarlaEngine::loadFilename(\"%s\")", filename);
+ CARLA_ASSERT(filename != nullptr);
-// -----------------------------------------------------------------------
-// Information (base)
+ // TODO
+ setLastError("Not implemented yet");
+ return false;
+}
bool CarlaEngine::loadProject(const char* const filename)
{
diff --git a/source/backend/standalone/CarlaStandalone.cpp b/source/backend/standalone/CarlaStandalone.cpp
index 9735664b6..f462061c6 100644
--- a/source/backend/standalone/CarlaStandalone.cpp
+++ b/source/backend/standalone/CarlaStandalone.cpp
@@ -106,54 +106,81 @@ const char* carla_get_extended_license_text()
if (retText.isEmpty())
{
- retText = "This current Carla build is using the following features and 3rd-party code:
";
- retText += "";
+ // code snippets
+ text2 = "Additionally, Carla uses code snippets from the following projects:
";
+ text2 += "";
+ text2 += "- Pointer and data leak utils from JUCE, http://www.rawmaterialsoftware.com/juce.php
";
+ text2 += "- Shared memory utils from dssi-vst, http://www.breakfastquay.com/dssi-vst/
";
+ text2 += "- Real-time memory pool, by Nedko Arnaudov
";
+ text2 += "
";
+
+ // LinuxSampler GPL exception
#ifdef WANT_LINUXSAMPLER
- retText += "(*) Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors.
";
+ text2 += "(*) Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors.
";
#endif
+
+ retText += text1;
+ retText += text2;
}
return retText;
@@ -204,13 +231,24 @@ const char* carla_get_engine_driver_name(unsigned int index)
return CarlaEngine::getDriverName(index);
}
+const void* carla_get_engine_driver_options(unsigned int index)
+{
+ carla_debug("carla_get_engine_driver_options(%i)", index);
+
+ return nullptr;
+}
+
// -------------------------------------------------------------------------------------------------------------------
unsigned int carla_get_internal_plugin_count()
{
carla_debug("carla_get_internal_plugin_count()");
+#ifdef WANT_NATIVE
return static_cast(CarlaPlugin::getNativePluginCount());
+#else
+ return 0;
+#endif
}
const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int internalPluginId)
@@ -219,6 +257,7 @@ const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int interna
static CarlaNativePluginInfo info;
+#ifdef WANT_NATIVE
const PluginDescriptor* const nativePlugin = CarlaPlugin::getNativePluginDescriptor(internalPluginId);
// as internal plugin, this must never fail
@@ -250,6 +289,7 @@ const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int interna
info.label = nativePlugin->label;
info.maker = nativePlugin->maker;
info.copyright = nativePlugin->copyright;
+#endif
return &info;
}
@@ -517,6 +557,19 @@ void carla_set_engine_option(CarlaBackend::OptionsType option, int value, const
// -------------------------------------------------------------------------------------------------------------------
+bool carla_load_filename(const char* filename)
+{
+ carla_debug("carla_load_filename(\"%s\")", filename);
+ CARLA_ASSERT(standalone.engine != nullptr);
+ CARLA_ASSERT(filename != nullptr);
+
+ if (standalone.engine != nullptr)
+ return standalone.engine->loadFilename(filename);
+
+ standalone.lastError = "Engine is not started";
+ return false;
+}
+
bool carla_load_project(const char* filename)
{
carla_debug("carla_load_project(\"%s\")", filename);
@@ -690,6 +743,35 @@ void carla_remove_all_plugins()
standalone.engine->removeAllPlugins();
}
+
+// -------------------------------------------------------------------------------------------------------------------
+
+bool carla_clone_plugin(unsigned int pluginId)
+{
+ carla_debug("carla_clone_plugin(%i)", pluginId);
+ CARLA_ASSERT(standalone.engine != nullptr);
+
+ if (standalone.engine == nullptr)
+ return false;
+
+ // TODO
+ return false;
+}
+
+bool carla_switch_plugins(unsigned int pluginIdA, unsigned int pluginIdB)
+{
+ carla_debug("carla_switch_plugins(%i, %i)", pluginIdA, pluginIdB);
+ CARLA_ASSERT(standalone.engine != nullptr);
+
+ if (standalone.engine == nullptr)
+ return false;
+
+ // TODO
+ return false;
+}
+
+// -------------------------------------------------------------------------------------------------------------------
+
bool carla_load_plugin_state(unsigned int pluginId, const char* filename)
{
carla_debug("carla_load_plugin_state(%i, \"%s\")", pluginId, filename);
diff --git a/source/carla_backend.py b/source/carla_backend.py
index e642aced7..c227c7f14 100644
--- a/source/carla_backend.py
+++ b/source/carla_backend.py
@@ -377,6 +377,9 @@ class Host(object):
self.lib.carla_get_engine_driver_name.argtypes = [c_uint]
self.lib.carla_get_engine_driver_name.restype = c_char_p
+ self.lib.carla_get_engine_driver_options.argtypes = [c_uint]
+ self.lib.carla_get_engine_driver_options.restype = c_void_p # TODO
+
self.lib.carla_get_internal_plugin_count.argtypes = None
self.lib.carla_get_internal_plugin_count.restype = c_uint
@@ -404,6 +407,9 @@ class Host(object):
self.lib.carla_set_engine_option.argtypes = [c_enum, c_int, c_char_p]
self.lib.carla_set_engine_option.restype = None
+ self.lib.carla_load_filename.argtypes = [c_char_p]
+ self.lib.carla_load_filename.restype = c_bool
+
self.lib.carla_load_project.argtypes = [c_char_p]
self.lib.carla_load_project.restype = c_bool
@@ -443,6 +449,12 @@ class Host(object):
self.lib.carla_remove_all_plugins.argtypes = None
self.lib.carla_remove_all_plugins.restype = None
+ self.lib.carla_clone_plugin.argtypes = [c_uint]
+ self.lib.carla_clone_plugin.restype = c_bool
+
+ self.lib.carla_switch_plugins.argtypes = [c_uint, c_uint]
+ self.lib.carla_switch_plugins.restype = c_bool
+
self.lib.carla_load_plugin_state.argtypes = [c_uint, c_char_p]
self.lib.carla_load_plugin_state.restype = c_bool
@@ -613,6 +625,9 @@ class Host(object):
def get_engine_driver_name(self, index):
return self.lib.carla_get_engine_driver_name(index)
+ def get_engine_driver_options(self, index):
+ return self.lib.carla_get_engine_driver_options(index)
+
def get_internal_plugin_count(self):
return self.lib.carla_get_internal_plugin_count()
@@ -641,6 +656,9 @@ class Host(object):
def set_engine_option(self, option, value, valueStr):
self.lib.carla_set_engine_option(option, value, valueStr.encode("utf-8"))
+ def load_filename(self, filename):
+ return self.lib.carla_load_filename(filename.encode("utf-8"))
+
def load_project(self, filename):
return self.lib.carla_load_project(filename.encode("utf-8"))
@@ -683,6 +701,12 @@ class Host(object):
def remove_all_plugins(self):
self.lib.carla_remove_all_plugins()
+ def clone_plugin(self, pluginId):
+ return self.lib.carla_clone_plugin(pluginId)
+
+ def switch_plugins(self, pluginIdA, pluginIdB):
+ return self.lib.carla_switch_plugins(pluginIdA, pluginIdB)
+
def load_plugin_state(self, pluginId, filename):
return self.lib.carla_load_plugin_state(pluginId, filename.encode("utf-8"))