tehn / mlr

mlr (norns)
25 stars 18 forks source link

fix invalid clip file detection #26

Closed csboling closed 4 years ago

csboling commented 4 years ago

fileselect_callback was checking if audio.file_info returned nil to determine if a sound file was invalid, but audio.file_info returns 0 channels and 0 samples in this case. This resulted in a quantization value of 0 being calculated, resulting in an infinite loop in calc_quant_off, which would softlock matron if you accidentally load an empty / corrupt / non-audio file.