File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
shared-module/audiofilters Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -223,10 +223,10 @@ audioio_get_buffer_result_t audiofilters_distortion_get_buffer(audiofilters_dist
223223 }
224224
225225 // get the effect values we need from the BlockInput. These may change at run time so you need to do bounds checking if required
226- mp_float_t drive = MIN ( MAX ( synthio_block_slot_get ( & self -> drive ) , 0.0 ) , 1.0 );
227- mp_float_t pre_gain = db_to_linear (MIN ( MAX ( synthio_block_slot_get ( & self -> pre_gain ) , -60.0 ) , 60.0 ));
228- mp_float_t post_gain = db_to_linear (MIN ( MAX ( synthio_block_slot_get ( & self -> post_gain ) , -80.0 ) , 24.0 ));
229- mp_float_t mix = MIN ( MAX ( synthio_block_slot_get ( & self -> mix ) , 0.0 ) , 1.0 );
226+ mp_float_t drive = synthio_block_slot_get_limited ( & self -> drive , 0.0 , 1.0 );
227+ mp_float_t pre_gain = db_to_linear (synthio_block_slot_get_limited ( & self -> pre_gain , -60.0 , 60.0 ));
228+ mp_float_t post_gain = db_to_linear (synthio_block_slot_get_limited ( & self -> post_gain , -80.0 , 24.0 ));
229+ mp_float_t mix = synthio_block_slot_get_limited ( & self -> mix , 0.0 , 1.0 );
230230
231231 // Switch our buffers to the other buffer
232232 self -> last_buf_idx = !self -> last_buf_idx ;
You can’t perform that action at this time.
0 commit comments