reset global var when stop
reset state struct after stop
Fix: opensl latency calc err at the beginning