fix frame calculation in gui, more fine tuning for sound detection