im working with audio in raw html and js and even if i play some notes first the first notes of a series of audio files i clone and play causes lag in the browser, but immediately corrects itself as it keeps playing. this is happening to me in both chrome and firefox, on both an m1 mac and my desktop i usually use it from for streaming.
anyone know how to deal with this? i tried both using preload="auto" (which did nothing) and pre-playing the first series of notes at 0 volume which apparently makes the song itself sound correct, but the browser still lags and the animation still desynchronizes with the audio for the first few notes.
code here if you want to take a look
you can test it out here by running angelYip() in the browser console, make sure you click on the screen first to play a yip so the sound works in the song
if you wanna see my pre-playing code you can find it here but given it only fixes half of the problem i figure i'd need something else to fix this.
