feat(inserts): add bulk enable, bypass and clear actions (phase 95)

This commit is contained in:
Johannes Findeisen 2026-11-06 02:07:19 +01:00
commit 924821738d
7 changed files with 48 additions and 6 deletions

View file

@ -36,14 +36,18 @@ typedef struct {
#define XTC_TRACK_INSERTS 8U
typedef struct { xtc_plugin_spec plugin; unsigned int enabled; float wet; } xtc_track_insert;
typedef struct { size_t count; float output_gain; xtc_track_insert slots[XTC_TRACK_INSERTS]; } xtc_track_chain;
/* Copies the selected slot immediately after itself, preserving all metadata.
* Input/output may alias; errors preserve output. */
/* Original internal-device starting points: 0 Slapback, 1 Dub Echo,
* 2 Ambient Space. Name returns NULL for an unknown index. No modules opened;
* template errors preserve out. Delay times are milliseconds, not beat sync. */
const char *xtc_track_chain_template_name(unsigned int index);
xtc_result xtc_track_chain_template(unsigned int index,unsigned int tempo,xtc_track_chain *out);
/* Copies the selected slot immediately after itself, preserving all metadata.
* Input/output may alias; errors preserve output. */
xtc_result xtc_track_chain_duplicate(const xtc_track_chain *chain,size_t index,xtc_track_chain *out);
/* Pure metadata operations, preserving output gain; aliases accepted and errors
* preserve out. Enabling missing plugins can fail later at plan preparation. */
typedef enum {XTC_CHAIN_ENABLE_ALL,XTC_CHAIN_BYPASS_ALL,XTC_CHAIN_CLEAR} xtc_chain_action;
xtc_result xtc_track_chain_bulk(const xtc_track_chain *chain,xtc_chain_action action,xtc_track_chain *out);
xtc_result xtc_track_chain_preset_save(const xtc_track_chain *chain,const char *path);
xtc_result xtc_track_chain_preset_load(const char *path,xtc_track_chain *out);
/* Metadata only; control thread. Empty chain has unity output. No module is