4 ms·
> when there are some heavy stuff on the main thread the audio may get glitches Where have you seen that? TFA is just using oscillators, not ScriptProcessor or
by fenomas 4y ago
> when there are some heavy stuff on the main thread the audio may get glitches
Where have you seen that? TFA is just using oscillators, not ScriptProcessor or anything, so one would expect all the heavy audio work to be happening outside the main thread.
Personally I use webaudio to do dynamic music for a game, and even though the game is reasonably heavy (3D, physics, etc) I've not noticed any particular glitching.
- chaosprint 4y agoYou are right! I should say ScriptProcessor there. But for heavy use of audio, especially when there are lots of interactions (often you want your own abstraction rather than the built-in nodes) and sample-level time should be taken into account, WASM+AudioWorklet should definitely be the first choice: https://youtu.be/GfC2WTStW8M?t=1084 https://youtu.be/GfC2WTStW8M?t=1084