Closed VictorChen closed 9 years ago
I'm currently using a naive approach of looping through all the loops and playing the ones that need to be played at the time. Instead, I should calculate the time between loops and chain them up with setTimeout. Although, be careful:
setTimeout
http://www.sitepoint.com/creating-accurate-timers-in-javascript/
fixed with: https://github.com/VictorChen/online-band/commit/884349e19d5bd9d451a417376da4411bf887325f
I'm currently using a naive approach of looping through all the loops and playing the ones that need to be played at the time. Instead, I should calculate the time between loops and chain them up with
setTimeout
. Although, be careful:http://www.sitepoint.com/creating-accurate-timers-in-javascript/