Re:Building a musical instrument with the Web Audio API
by chaosprint on Friday May 13, 2022 @11:26AM
(#31368866)
I think it's all about trade-offs.
For example, I can also point out that the latency on Windows, macOS are too high as these are general-purpose oriented systems. See this paper:
http://eecs.qmul.ac.uk/~andrewm/mcpherson_nime2016.pdf
Similar dilemma we have for the general-purposed browsers. To push to a limit, we can only resort to bare metal or Xenomai Linux like Daisy or Bela. But for the same reason we use Windows and macOS, we trade off some audio performance for a better overall experience.
Re:Building a musical instrument with the Web Audio API
by PaulDavisThe1st on Friday May 13, 2022 @11:51AM
(#31369169)
Most of the problems with the lower limit on audio latency these days come down to hardware (motherboard/PCI bus level) rather than the OS. Both macOS and Linux can routinely handle values significantly lower than the 10msec mentioned in the paper you cited, given the right hardware (more or less guaranteed for macOS, much harder to ensure for Linux).
Windows, macOS, Linux all offer this control.
AudioWorklet does not offer much control of thread priority (read the source code of any DAW to see how much is actually done), and also isn't clearly appropriate for parallelization of DAW processing, which is a standard architecture in any current DAW.
It's not really about asm programming. It's about the ability with the host OS in all the appropriate and required ways. Browsers are extremely unlikely to permit this, for a variety of very sensible reasons.