4 ms·
I'm curious how he was able to synchronize to the audio. I have found with at least Chrome on OSX, the audio tag's callbacks have a varying delay with the audio
by city41 14y ago
I'm curious how he was able to synchronize to the audio. I have found with at least Chrome on OSX, the audio tag's callbacks have a varying delay with the audio. Seems to be at the OS level and beyond Chrome's control. The delay mostly goes away the second time through, as if whatever's actually playing the mp3 is cached and primed.
- jsantell 14y agoIn Chrome, the Web Audio API is used -- not using an audio tag. As each chunk of the buffer comes in to be played and decoded, it's processed for spectrum and waveform data: https://github.com/jsantell/dancer.js/blob/master/src/adapterWebkit.js https://github.com/jsantell/dancer.js/blob/master/src/adapte...