2024-12-01 19:35:24 +00:00
|
|
|
//| Copyright: (C) 2020-2024 Kevin Larke <contact AT larke DOT org>
|
|
|
|
//| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
|
2021-12-11 20:19:55 +00:00
|
|
|
#ifndef cwIoFlow_h
|
|
|
|
#define cwIoFlow_h
|
|
|
|
|
|
|
|
namespace cw
|
|
|
|
{
|
|
|
|
namespace io_flow
|
|
|
|
{
|
|
|
|
typedef handle< struct io_flow_str > handle_t;
|
|
|
|
|
2021-12-19 17:12:39 +00:00
|
|
|
rc_t create( handle_t& hRef, io::handle_t ioH, double srate, unsigned crossFadeCnt, const object_t& flow_class_dict, const object_t& cfg );
|
2021-12-11 20:19:55 +00:00
|
|
|
rc_t destroy( handle_t& hRef );
|
2021-12-19 17:12:39 +00:00
|
|
|
|
2024-02-18 13:41:19 +00:00
|
|
|
unsigned preset_cfg_flags( handle_t h );
|
|
|
|
|
2021-12-11 20:19:55 +00:00
|
|
|
rc_t exec( handle_t h, const io::msg_t& msg );
|
2021-12-19 17:12:39 +00:00
|
|
|
|
2021-12-26 03:16:00 +00:00
|
|
|
|
2021-12-28 01:24:43 +00:00
|
|
|
// Apply a preset to the 'next' network instance and activate it immediately.
|
|
|
|
rc_t apply_preset( handle_t h, unsigned crossFadeMs, const char* presetLabel );
|
|
|
|
|
|
|
|
// Apply a preset to the selected network instance (current or next).
|
|
|
|
// If the preset is applied to the 'next' network instance then use 'begin_cross_fade()' to
|
|
|
|
// activate the next network.
|
2021-12-26 03:16:00 +00:00
|
|
|
rc_t apply_preset( handle_t h, flow_cross::destId_t destId, const char* presetLabel );
|
|
|
|
|
2024-01-13 15:17:42 +00:00
|
|
|
rc_t apply_preset( handle_t h, flow_cross::destId_t destId, const flow::multi_preset_selector_t& multi_preset_sel );
|
|
|
|
|
2021-12-26 03:16:00 +00:00
|
|
|
rc_t set_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, bool value );
|
|
|
|
rc_t set_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, int value );
|
|
|
|
rc_t set_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, unsigned value );
|
|
|
|
rc_t set_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, float value );
|
|
|
|
rc_t set_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, double value );
|
2023-01-05 12:26:25 +00:00
|
|
|
|
2021-12-26 03:16:00 +00:00
|
|
|
rc_t begin_cross_fade( handle_t h, unsigned crossFadeMs );
|
2023-01-05 12:26:25 +00:00
|
|
|
|
|
|
|
rc_t get_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, bool& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, int& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, unsigned& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, float& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, flow_cross::destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, double& valueRef );
|
2021-12-11 20:19:55 +00:00
|
|
|
|
|
|
|
|
2022-01-03 01:22:47 +00:00
|
|
|
void print( handle_t h );
|
|
|
|
void print_network( handle_t h, flow_cross::destId_t destId );
|
2023-01-05 12:26:25 +00:00
|
|
|
void report( handle_t h );
|
2021-12-11 20:19:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|