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

audioContext() is undefined when using -s PROXY_TO_PTHREAD=1 #17880

Open
Jonathhhan opened this issue Sep 18, 2022 · 3 comments
Open

audioContext() is undefined when using -s PROXY_TO_PTHREAD=1 #17880

Jonathhhan opened this issue Sep 18, 2022 · 3 comments

Comments

@Jonathhhan
Copy link
Contributor

audioContext() is undefined, if I use PROXY_TO_PTHREAD=1. Maybe it is not proxied to the pthread?

@sbc100
Copy link
Collaborator

sbc100 commented Sep 19, 2022

What code are you calling that requires AudioContext? Is it part of the emscripten SDL implementation?

@Jonathhhan
Copy link
Contributor Author

Jonathhhan commented Sep 20, 2022

@sbc100
Copy link
Collaborator

sbc100 commented Sep 20, 2022

So it looks like AudioContext doesn't exist in workers so if you want to use it from a pthread you would need to proxy those calls back to the main thread. There are several different ways to do that but a good place to start would be https://emscripten.org/docs/porting/pthreads.html#proxying

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

2 participants