[Openal-devel] OpenAL Driver Selection

Chris Robinson chris.kcat at gmail.com
Thu Jun 12 17:08:25 PDT 2008


On Thursday 12 June 2008 03:47:55 am Richard Furse wrote:
> I'm really interested in folks' opinions on all this. I've found that most
> games don't allow the user to select the OpenAL device to be used and the
> logic used to select one seems variable and . curious. I'm guessing there
> are plenty of games developers on this list - what is the experience of
> selecting an OpenAL device from that side? Also, do fans of openal-soft
> find it sufficiently easy to select?

Selecting an OpenAL device isn't difficult at all. Just call 
alcGetString(NULL, ALC_DEVICE_SPECIFIER); and you get a NULL seperated list 
(a more precise list can be gotten with ALC_ALL_DEVICES_SPECIFIER if the 
ALC_ENUMERATE_ALL_EXT extension is available). Passing one of those strings 
(either directly, or a copy) to alcOpenDevice will attempt to open that 
device, and fail if it can't (at which point, opening NULL as a safety 
fallback would work).

That functionality, though, was added in OpenAL 1.1 (or via the 
ALC_ENUMERATION_EXT extension), so some games may not be expecting it. I 
wouldn't be surprised if some games even pass a hard-coded "DirectSound" 
or "DirectSound3D". I could've sworn some games (such as those based on the 
Doom3 engine) let you select the device, even if manually, but I can't find 
the config variable for it..

I agree it would be nice though, if more apps included an option for selecting 
a specific device.

> My instinct is that the right thing to do is to update the router DLL so
> that it's configurable by the user and to tighten up the documentation to
> encourage games designers to use the central OpenAL install and the default
> implementation (unless they have a good reason not to). We could put a nice
> glossy screen into Control Panel or suchlike which could examine the OpenAL
> implementations available on the machine, enable/disable, select the
> default and perhaps provide few test buttons.

I like this idea. Something I wanted to do for OpenAL Soft is to make a GUI 
app (using Qt4) to let users specify what default output parameters and 
devices to use. I've just never got around to it because I don't know 
anything about coding GUI apps. But having a Windows equivilant of that would 
be nice. Say, a control panel applet that lets you enable/disable specific 
drivers (*oal.dll files) and set their priorities, along with a tab for each 
driver that exports a configuration interface from the DLL to configure 
itself. Drivers that don't export such an interface just wouldn't get its own 
configuration tab, but could still be enabled/disabled and prioritized.


More information about the Openal-devel mailing list