Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pass plugin path settings to auto-discovery
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 2, 2023
1 parent d8e4cc7 commit 1d24af0
Show file tree
Hide file tree
Showing 10 changed files with 576 additions and 276 deletions.
1 change: 0 additions & 1 deletion source/backend/CarlaBackend.h
Expand Up @@ -644,7 +644,6 @@ typedef enum {

/*!
* VST3 plugin.
* @note Windows and MacOS only
*/
PLUGIN_VST3 = 6,

Expand Down
194 changes: 100 additions & 94 deletions source/backend/CarlaUtils.h
Expand Up @@ -22,6 +22,7 @@

#ifdef __cplusplus
using CARLA_BACKEND_NAMESPACE::BinaryType;
using CARLA_BACKEND_NAMESPACE::EngineOption;
using CARLA_BACKEND_NAMESPACE::PluginCategory;
using CARLA_BACKEND_NAMESPACE::PluginType;
#endif
Expand All @@ -35,100 +36,6 @@ using CARLA_BACKEND_NAMESPACE::PluginType;
* @{
*/

/*!
* Information about a cached plugin.
* @see carla_get_cached_plugin_info()
*/
typedef struct _CarlaCachedPluginInfo {
/*!
* Wherever the data in this struct is valid.
* For performance reasons, plugins are only checked on request,
* and as such, the count vs number of really valid plugins might not match.
* Use this field to skip on plugins which cannot be loaded in Carla.
*/
bool valid;

/*!
* Plugin category.
*/
PluginCategory category;

/*!
* Plugin hints.
* @see PluginHints
*/
uint hints;

/*!
* Number of audio inputs.
*/
uint32_t audioIns;

/*!
* Number of audio outputs.
*/
uint32_t audioOuts;

/*!
* Number of CV inputs.
*/
uint32_t cvIns;

/*!
* Number of CV outputs.
*/
uint32_t cvOuts;

/*!
* Number of MIDI inputs.
*/
uint32_t midiIns;

/*!
* Number of MIDI outputs.
*/
uint32_t midiOuts;

/*!
* Number of input parameters.
*/
uint32_t parameterIns;

/*!
* Number of output parameters.
*/
uint32_t parameterOuts;

/*!
* Plugin name.
*/
const char* name;

/*!
* Plugin label.
*/
const char* label;

/*!
* Plugin author/maker.
*/
const char* maker;

/*!
* Plugin copyright/license.
*/
const char* copyright;

#ifdef __cplusplus
/*!
* C++ constructor.
*/
CARLA_API _CarlaCachedPluginInfo() noexcept;
CARLA_DECLARE_NON_COPYABLE(_CarlaCachedPluginInfo)
#endif

} CarlaCachedPluginInfo;

/* --------------------------------------------------------------------------------------------------------------------
* plugin discovery */

Expand Down Expand Up @@ -330,9 +237,108 @@ CARLA_PLUGIN_EXPORT void carla_plugin_discovery_skip(CarlaPluginDiscoveryHandle
*/
CARLA_PLUGIN_EXPORT void carla_plugin_discovery_stop(CarlaPluginDiscoveryHandle handle);

/*!
* Set a plugin discovery setting, to be applied globally.
*/
CARLA_PLUGIN_EXPORT void carla_plugin_discovery_set_option(EngineOption option, int value, const char* valueStr);

/* --------------------------------------------------------------------------------------------------------------------
* cached plugins */

/*!
* Information about a cached plugin.
* @see carla_get_cached_plugin_info()
*/
typedef struct _CarlaCachedPluginInfo {
/*!
* Wherever the data in this struct is valid.
* For performance reasons, plugins are only checked on request,
* and as such, the count vs number of really valid plugins might not match.
* Use this field to skip on plugins which cannot be loaded in Carla.
*/
bool valid;

/*!
* Plugin category.
*/
PluginCategory category;

/*!
* Plugin hints.
* @see PluginHints
*/
uint hints;

/*!
* Number of audio inputs.
*/
uint32_t audioIns;

/*!
* Number of audio outputs.
*/
uint32_t audioOuts;

/*!
* Number of CV inputs.
*/
uint32_t cvIns;

/*!
* Number of CV outputs.
*/
uint32_t cvOuts;

/*!
* Number of MIDI inputs.
*/
uint32_t midiIns;

/*!
* Number of MIDI outputs.
*/
uint32_t midiOuts;

/*!
* Number of input parameters.
*/
uint32_t parameterIns;

/*!
* Number of output parameters.
*/
uint32_t parameterOuts;

/*!
* Plugin name.
*/
const char* name;

/*!
* Plugin label.
*/
const char* label;

/*!
* Plugin author/maker.
*/
const char* maker;

/*!
* Plugin copyright/license.
*/
const char* copyright;

#ifdef __cplusplus
/*!
* C++ constructor.
*/
CARLA_API _CarlaCachedPluginInfo() noexcept;
CARLA_DECLARE_NON_COPYABLE(_CarlaCachedPluginInfo)
#endif

} CarlaCachedPluginInfo;

/*!
* Get how many cached plugins are available.
* Internal and LV2 plugin formats are cached and need to be discovered via this function.
Expand Down

0 comments on commit 1d24af0

Please sign in to comment.