switch

Files: switch.h, switch.c

Switch between two signals
By default, the incoming first signal is selected. When triggered, the output signal will switch to the other signal.

Functions

sp_switch_create(sp_switch **switch)
sp_switch_init(sp_data *sp, sp_switch *switch)
sp_switch_compute(sp_data *sp, sp_switch *switch, SPFLOAT *trig, SPFLOAT *input_1, SPFLOAT *input_2, SPFLOAT *out)
sp_switch_destroy(sp_switch **switch)

Inputs

trig: When non-zero, will switch to the other signal.
input_1: Signal input 1. This is the default signal.
input_2: Signal input 2.

Outputs

out: Signal output.