Closed ebekebe closed 1 year ago
Real strange, this used to work. console.log
from the worklet doesn't work either.
Real strange, this used to work.
console.log
from 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.
FYI, I just checked in a newer version of Safari and this is working again. Yeah!
@EricTetz that is great news, so I am going to close this issue.
Thanks for checking folks, glad this is working. I'll be updating the readme.
SharedArrayBuffer is supported from Safari 15.2. every earlier version will just do nothing of course. https://caniuse.com/sharedarraybuffer
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?