ringbuf.js
ringbuf.js copied to clipboard
main-thread-to-audioworklet doesn't work on Safari
I tried to run main-thread-to-audioworklet on Safari 15.4 on macOS with __XPC_JSC_useSharedArrayBuffer=1, but it doesn't work. Is that a known limitation of Safari?
Real strange, this used to work. console.log from the worklet doesn't work either.
Real strange, this used to work.
console.logfrom the worklet doesn't work either.
I got this problem too. Safari version 15.2
to be able to work an class named "SharedArrayBuffer" should exist, which is nowhere to find.. means as it does not exist in Safari the ringbuff works starting Safari 15.2 and has no fallback
@designerfuzzi If SharedArrayBuffer is missing it's because the file was served with the wrong headers (see here).
I'm seeing the everything get instantiated correctly, the AudioContext change status to "running", the AudioWorkletNode gets loaded (its script is loaded and shows up in the debugger), and Safari even shows a icon in the URL bar (e.g. 🔊) to indicate that the tab is making sound. Just... nothing comes out. The AudioWorkletNode is not pulling data from the ring buffer, so it gets full and then is never written to again.
I've only been doing web audio for a few weeks and I think it's aged me a year. AudioWorkletNode is the bleeding edge, latest and great addition to the API, and it has a hardcoded buffer size? I don't understand who's writing this stuff.
Your approach here is clearly the best way to feed audio to the thread, and it just magically stops working in Safari. The debugger tells you nothing.