@@ -188,9 +188,7 @@ static mp_obj_t audiofilters_filter_obj_lpf(size_t n_args, const mp_obj_t *pos_a
188188
189189 mp_float_t w0 = f0 / self -> sample_rate * 2 * MP_PI ;
190190
191- mp_obj_t biquad = common_hal_synthio_new_lpf (w0 , Q );
192- common_hal_audiofilters_filter_set_filter (self , biquad );
193- return biquad ;
191+ return common_hal_synthio_new_lpf (w0 , Q );
194192}
195193
196194MP_DEFINE_CONST_FUN_OBJ_KW (audiofilters_filter_lpf_obj , 1 , audiofilters_filter_obj_lpf );
@@ -220,9 +218,7 @@ static mp_obj_t audiofilters_filter_obj_hpf(size_t n_args, const mp_obj_t *pos_a
220218
221219 mp_float_t w0 = f0 / self -> sample_rate * 2 * MP_PI ;
222220
223- mp_obj_t biquad = common_hal_synthio_new_hpf (w0 , Q );
224- common_hal_audiofilters_filter_set_filter (self , biquad );
225- return biquad ;
221+ return common_hal_synthio_new_hpf (w0 , Q );
226222}
227223
228224MP_DEFINE_CONST_FUN_OBJ_KW (audiofilters_filter_hpf_obj , 1 , audiofilters_filter_obj_hpf );
@@ -254,9 +250,7 @@ static mp_obj_t audiofilters_filter_obj_bpf(size_t n_args, const mp_obj_t *pos_a
254250
255251 mp_float_t w0 = f0 / self -> sample_rate * 2 * MP_PI ;
256252
257- mp_obj_t biquad = common_hal_synthio_new_bpf (w0 , Q );
258- common_hal_audiofilters_filter_set_filter (self , biquad );
259- return biquad ;
253+ return common_hal_synthio_new_bpf (w0 , Q );
260254}
261255
262256MP_DEFINE_CONST_FUN_OBJ_KW (audiofilters_filter_bpf_obj , 1 , audiofilters_filter_obj_bpf );
0 commit comments