8 ms·
The age old solution to this problem continues to work just fine - have jitter-tolerant low frequency scheduler callbacks that schedule events using an accurate
by sriku 7y ago
The age old solution to this problem continues to work just fine - have jitter-tolerant low frequency scheduler callbacks that schedule events using an accurate clock (sample time) a short way (100ms or so) into the future. That way you get both accurate audio with timely response. Been doing this kind of thing for 20+ years now .. web or noweb.
I use an encapsulated "steller" library to do this with JS on the web. Steller can sync graphics with audio too.
Really wish the joint "get time stamp" function that gives current DOMHiresTimestamp and the synchronized AudioContext currentTime were available on all browsers.
Steller - https://github.com/srikumarks/steller https://github.com/srikumarks/steller
Taka Keeper - http://talakeeper.org/talas.html http://talakeeper.org/talas.html (targeted at South Indian classical music forms, so not all may get the terms)
Edit: Fixed autocorrect errors