diff options
Diffstat (limited to 'lib/oscillator_cross.c')
| -rw-r--r-- | lib/oscillator_cross.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/oscillator_cross.c b/lib/oscillator_cross.c index 0c6c5f8..1510738 100644 --- a/lib/oscillator_cross.c +++ b/lib/oscillator_cross.c @@ -23,7 +23,7 @@ ts_parameter_t const ts_oscillator_cross_p = { .n_inputs = 1, .n_outputs = 1, .n uint_t ts_oscillator_cross_offset( ts_constant_t const *c ) { ( void )c; - return ( c ? (uint_t)((ts_oscillator_cross_params_t *)c)->slow : 0 ); + return ( c ? (uint_t)((ts_oscillator_cross_params_t const *)c)->slow : 0 ); } int ts_oscillator_cross( @@ -34,10 +34,9 @@ int ts_oscillator_cross( { TS_PROLOGUE( ts_oscillator_cross_p ); if ( !c ) return -1; - fp_t const fast = ((ts_oscillator_cross_params_t *)c)->fast; - fp_t const slow = ((ts_oscillator_cross_params_t *)c)->slow; + fp_t const fast = ((ts_oscillator_cross_params_t const *)c)->fast; + fp_t const slow = ((ts_oscillator_cross_params_t const *)c)->slow; if (fast == 0 || slow == 0) return -1; - if (n == 0) return -1; fp_t const fast_a = 1.0 / fast; fp_t const slow_a = 1.0 / slow; fp_t fast_e = x[0][0]; |