[openal] alcSuspend/ProcessContext behavior?
chris.kcat at gmail.com
Mon Sep 21 06:10:43 EDT 2015
I partly solved the issue, which was due to my own fault. I wasn't
updating internal listener properties when suspending a context forced
an update. However, there's still a remaining issue.
OpenAL Soft's suspend behavior includes deferring alSourcePlay and
alSourcePause calls, so if those calls are made while a context is
suspended, they won't take effect until processed. The idea there is
two-fold: for one, it provides a way for an app to "stop" one sound and
play another at the same time by pausing one source and playing another
while updates are deferred, and second, it avoids some messiness with a
source needing to be updated before playing with property changes that
Consequently, the app plays a sound while updates are suspended, which
defers the play state change, and then checks sources to see if any
aren't playing before updates are processed. As a result, it sees the
source as not playing and cleans it up before it gets a chance to play.
The only way I can think to fix this is to report the deferred state
when AL_SOURCE_STATE is queried, but this would be a lie. The app would
see a source as paused while it's continuing to play and advance, or see
it as playing while it's not advancing.
More information about the openal