clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 7f6f6259b422064bd52eac99b374fcdf0f82d890
parent d6cbd4fd6540e80be816994f6f6bccc7933998ef
Author: defiantnerd <97224712+defiantnerd@users.noreply.github.com>
Date:   Wed, 11 Jan 2023 13:44:31 +0100

Update audio-ports-config.h

added possibility to inquiry the exact bus layout for an configuration.
Diffstat:
Minclude/clap/ext/audio-ports-config.h | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/include/clap/ext/audio-ports-config.h b/include/clap/ext/audio-ports-config.h @@ -2,6 +2,7 @@ #include "../string-sizes.h" #include "../plugin.h" +#include "audio-ports.h" /// @page Audio Ports Config /// @@ -20,8 +21,12 @@ /// /// Plugins with very complex configuration possibilities should let the user configure the ports /// from the plugin GUI, and call @ref clap_host_audio_ports.rescan(CLAP_AUDIO_PORTS_RESCAN_ALL). +/// +/// To inquire the exact bus layout, the plugin implements the clap_plugin_audio_ports_config_info_t +/// extension where all busses can be retrieved in the same way as in the audio-port extension. static CLAP_CONSTEXPR const char CLAP_EXT_AUDIO_PORTS_CONFIG[] = "clap.audio-ports-config"; +static CLAP_CONSTEXPR const char CLAP_EXT_AUDIO_PORTS_CONFIG_INFO[] = "clap.audio-ports-config-info"; #ifdef __cplusplus extern "C" { @@ -65,6 +70,16 @@ typedef struct clap_plugin_audio_ports_config { bool(CLAP_ABI *select)(const clap_plugin_t *plugin, clap_id config_id); } clap_plugin_audio_ports_config_t; +typedef struct clap_plugin_audio_ports_config_info { + // get info about about an audio port. + // [main-thread] + bool(CLAP_ABI* get)(const clap_plugin_t* plugin, + clap_id config_id, + uint32_t port_index, + bool is_input, + clap_audio_port_info_t* info); +} clap_plugin_audio_ports_config_info_t; + typedef struct clap_host_audio_ports_config { // Rescan the full list of configs. // [main-thread]