Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add Worklet module to Tone Context in FireFox #1205

Open
javieraizpuru opened this issue Aug 19, 2023 · 2 comments
Open

Can't add Worklet module to Tone Context in FireFox #1205

javieraizpuru opened this issue Aug 19, 2023 · 2 comments

Comments

@javieraizpuru
Copy link

javieraizpuru commented Aug 19, 2023

After getting this error: #681 and changing the Tone Context to use a Tone.Context() object. I'm getting the error TypeError: can't access property "buffer", i[0][0] is undefined.

audioContext = new Tone.Context(); 
Tone.setContext(audioContext);
audioContext.addAudioWorkletModule('/js/phase-vocoder.js', 'phase-vocoder-processor');

The module used is phaze, but I don't think the problem is with the module since it works without ToneJS.
I'm using Firefox Developer 117.0b9

@marcelblum
Copy link
Contributor

Looks like audioWorklet support in Tone on Firefox is broken, likely an issue with standardized-audio-context, might be fixed in tone@latest if you haven't tried it. But you can also work around it by using native code via the unwrapped context:
audioContext.rawContext._nativeAudioContext.audioWorklet.addModule("/js/phase-vocoder.js").then(...)

@chrisguttandin
Copy link
Contributor

@javieraizpuru Is that a version of phaze which contains this fix? Could you please provide the stack trace of the error If you're already using the most recent version of phaze and Tone.js? Of course a minimal test case to reproduce the error would be even better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants