BackgroundDetect Function issue

hello,

I am using backgrounddetect function in my application. My problem is that my function stop working (it is not able to detect sound) after every 2-3 days. I am doing testing for whole day using this function.

I solved it previously by re-making the dsp.c and app.c files in which i changed the valud of default_threshold which was 512 by default.

Please suggest me for permanent solution.

Regards,
Jayesh dhandha