emscripten-core / emscripten-core/emscripten
pthreads and webaudio doesn't work together
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Please include the following in your bug report:
**Version of emscripten/emsdk:**
Please include the output `emcc -v` here
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.23 (5ae63ce7dd955df449cb419bfe5afc51d1bd57f2)
clang version 16.0.0 (https://github.com/llvm/llvm-project 8b587113b746f31b63fd6473083df78cef30a72e)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/terop/cvs/emscripten/emsdk/upstream/bin
**Failing command line in full:**
If this is compile or link-time failure please include the full failing command
along with its entire output.
**Full link command and output with `-v` appended:**
Even for runtime issues it helps a lot if you can include the full link command.
Adding `-v` to the link command will show all of the sub-commands run which
can help us diagnose your issue.
The problem is with line:
SDL.audioContext['decodeAudioData'](arrayBuffer, onDecodeComplete);
in the generated .js file. the arraybuffer is sharedArrayBuffer and not ordinary arraybuffer and thus the decodeAudioData fails.
When arraybuffer is sharedArrayBuffer the line should do something more useful than crashing.
Contributor guide
Assessment
This issue has not been assessed yet.