xiph/rnnoise

Potential underflow / overflow when converting from float to int16

Meoo opened this issue · 1 comments

Meoo commented

In the example code "rnnoise_demo", the float output is converted to a short with a simple cast

I found by experimentation that the output can be outside of int16 range, so the output should be clamped to prevent clicky noises when the input has values near the int16's min or max

Hi,did you solved the problem?