diff options
| author | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
|---|---|---|
| committer | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
| commit | 3d92926a902017e7cf1f5738e99ff62da596ce12 (patch) | |
| tree | 2b55422c26a48759d56fa91f06df24449e9dfa88 /lib/oscillator_cross.c | |
| parent | 07e18043145f3d91c8ea7ec3ad41b3c905585277 (diff) | |
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]; |