emscripten-core / emscripten-core/emscripten

OpenAL Streams go to AL_STOPPED state

Open
#15,639 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Hi,

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

- My audio code is ran by a thread that is created by std::thread (so a native posix thread).
- My audio system is generating buffers with 0 data when no actual audio is played by the game.
- I'm filling audio buffers with 20ms of audio data.
- Not detecting any buffer underruns.
- My audio thread polls the source objects every few ms and does a call to alGetSourcei(, AL_BUFFERS_PROCESSED) and then alSourceUnqueueBuffers to get the buffer handles of buffers that were consumed and then fills them again and calls alSourceQueueBuffers again for those.

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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.