feat(presets): save and adopt reusable effect chains (phase 87)

This commit is contained in:
Johannes Findeisen 2026-11-06 01:40:13 +01:00
commit b6d0771b4f
8 changed files with 67 additions and 5 deletions

View file

@ -31,9 +31,13 @@ typedef struct {
unsigned int tempo, point_count; /* milli-BPM, 20000..300000 */
xtc_plugin_point points[XTC_PLUGIN_POINTS];
} xtc_plugin_spec;
/* Atomic versioned metadata presets; load never executes plugin code and
* preserves out on error. Modules are verified only when adopting playback. */
#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;
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
* opened here. Nonempty chains are mono effects on non-bus tracks. */
/* Allocates the exact serial/parallel graph used by playback. Caller owns it. */