summaryrefslogtreecommitdiffstats
path: root/lib/apo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/apo.c')
-rw-r--r--lib/apo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/apo.c b/lib/apo.c
index f888162..fa720a7 100644
--- a/lib/apo.c
+++ b/lib/apo.c
@@ -20,7 +20,7 @@ ts_parameter_t const ts_apo_p = { .n_inputs = 1, .n_outputs = 1, .n_constants =
uint_t ts_apo_offset( ts_constant_t const *c )
{
( void )c;
- return ( c ? (uint_t)((ts_apo_params_t *)c)->slow_k - 1 : 0 );
+ return ( c ? (uint_t)((ts_apo_params_t const *)c)->slow_k - 1 : 0 );
}
int ts_apo(
@@ -31,10 +31,9 @@ int ts_apo(
{
TS_PROLOGUE( ts_apo_p );
if ( !c ) return -1;
- if (n == 0) return -1;
- fp_t fast_k = ((ts_apo_params_t *)c)->fast_k;
- fp_t slow_k = ((ts_apo_params_t *)c)->slow_k;
+ fp_t fast_k = ((ts_apo_params_t const *)c)->fast_k;
+ fp_t slow_k = ((ts_apo_params_t const *)c)->slow_k;
if (fast_k == 0 || slow_k == 0) return -1;
fp_t fast_a = 1.0 / fast_k;