alcOpenDevice missing timeout attribute for bounded device acquisition
0 reputation · 29 Oct 2024, 11:09 UTC
Context
The OpenAL 1.1 specification does not define a timeout for alcOpenDevice or alcCaptureOpenDevice. Implementations may block until the audio backend becomes available or fail immediately, with no standard mechanism to bound the wait time.
Constraint
OpenAL Soft inherits this behavior and provides no built-in way to abort a pending device open. The ALC_EXT_disconnect extension handles post-open disconnection but not initial connection timeouts. Applications resort to spawning a separate thread and using platform-specific cancellation, which risks resource leaks and leaves the audio backend in an inconsistent state.
Goal
Determine whether a portable timeout attribute should be introduced for device acquisition, and what semantics it should guarantee across backends.
Should a future ALC_OPEN_TIMEOUT_SOFT attribute apply to both playback and capture devices? Would a zero value mean non-blocking polling, and how should implementations signal timeout versus other failures? Is there consensus among implementers on adding this to the specification versus keeping it as a vendor extension?