Fix setInterval bug and adjust sampleRate.