enhance and optmize

call cancelAnimationFrame after the sound finished to prevent the
potential memory insrease and reduce the CPU cost