In the beginning of developing my web-based metronome app (https://metpro34.com), I quickly realized that typical approaches to playing audio with code would simply not work.
The use-case of a metronome may not sound that exciting, but it requires extreme accuracy and consistency, otherwise it is unusable.
Let’s take a look at what I tried, and what it takes to get low latency audio on the web.
Initially, using either
setTimeout seems like a reasonable idea to try. …