2021-12-19 17:11:34 +00:00
|
|
|
#ifndef cwFlowCross_h
|
|
|
|
#define cwFlowCross_h
|
|
|
|
|
|
|
|
namespace cw
|
|
|
|
{
|
|
|
|
namespace flow_cross
|
|
|
|
{
|
|
|
|
|
|
|
|
typedef handle<struct flow_cross_str> handle_t;
|
|
|
|
|
2021-12-26 03:16:00 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
kCurDestId, // Apply value to the current flow network
|
|
|
|
kNextDestId, // Apply value to the next flow network (i.e. network which will be current following the next cross-fade)
|
2022-01-22 14:51:54 +00:00
|
|
|
kAllDestId, // Apply value to all the flow networks
|
2021-12-26 03:16:00 +00:00
|
|
|
} destId_t;
|
|
|
|
|
2021-12-19 17:11:34 +00:00
|
|
|
rc_t create( handle_t& hRef,
|
|
|
|
const object_t& classCfg,
|
|
|
|
const object_t& networkCfg,
|
|
|
|
double srate,
|
|
|
|
unsigned crossN = 2, // max count of active cross-fades
|
|
|
|
flow::external_device_t* deviceA = nullptr,
|
|
|
|
unsigned deviceN = 0);
|
|
|
|
|
|
|
|
rc_t destroy( handle_t& hRef );
|
|
|
|
|
2024-02-18 13:41:19 +00:00
|
|
|
unsigned preset_cfg_flags( handle_t h );
|
|
|
|
|
2021-12-19 17:11:34 +00:00
|
|
|
// Run one cycle of the network.
|
|
|
|
rc_t exec_cycle( handle_t h );
|
|
|
|
|
2021-12-26 03:16:00 +00:00
|
|
|
rc_t apply_preset( handle_t h, destId_t destId, const char* presetLabel );
|
2024-01-13 15:17:42 +00:00
|
|
|
rc_t apply_preset( handle_t h, 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, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, bool value );
|
|
|
|
rc_t set_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, int value );
|
|
|
|
rc_t set_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, unsigned value );
|
|
|
|
rc_t set_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, float value );
|
|
|
|
rc_t set_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, double value );
|
2021-12-19 17:11:34 +00:00
|
|
|
|
2023-01-05 12:26:25 +00:00
|
|
|
rc_t get_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, bool& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, int& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, unsigned& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, float& valueRef );
|
|
|
|
rc_t get_variable_value( handle_t h, destId_t destId, const char* inst_label, const char* var_label, unsigned chIdx, double& valueRef );
|
|
|
|
|
2021-12-26 03:16:00 +00:00
|
|
|
rc_t begin_cross_fade( handle_t h, unsigned crossFadeMs );
|
|
|
|
|
2021-12-19 17:11:34 +00:00
|
|
|
void print( handle_t h );
|
2022-01-22 14:51:54 +00:00
|
|
|
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-19 17:11:34 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|