emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.57k stars 3.27k forks source link

OpenAL Streams go to AL_STOPPED state #15639

Open ensisoft opened 2 years ago

ensisoft commented 2 years ago

Hi,

I have the following problem that my OpenAL streams go into AL_stopped state.

Is one of these maybe causing the issue? Or is it related to ALC_SOFT_pause_device maybe?

Any help would be appreciated. Thanks!

FYI My OpenAL code works perfectly against openal on desktop linux (Archlinux, not sure about the OpenAL impl)

ensisoft commented 2 years ago

Here's an attached test case without any threading. You should be able to run this on your Linux desktop as well as in the browser after building into WASM with Emscripten. The build flags and commands are in the source file.

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.0.0 (3fd52e107187b8a169bb04a02b9f982c8a075205)

I've tested with the following browsers:

Chromium: Version 96.0.4664.45 (Official Build) Arch Linux (64-bit)

Firefox: 94.0.2 (64-bit)

Summary. A bunch of inconsistent behavior and a random stop in playback on Chromium.

sine.cpp.txt