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)
|
|
|
|
} 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 );
|
|
|
|
|
|
|
|
// 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 );
|
|
|
|
|
|
|
|
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
|
|
|
|
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 );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|