transfer some math to utils, add a cloneAudioBuffer in utils.