[Openal] HOWTO specify a backend/output at runtime?
noisyb at gmx.net
Wed Jun 20 08:49:55 PDT 2007
Jason Daly wrote:
> Dirk wrote:
>> How do I get an array of strings for possible output-devices/backends I
>> can/could use with alcOpenDevice() ? So If I want to use SDL instead of,
>> let's say ALSA, how do I find out it is active and how do I know which
>> string to use with alcOpenDevice()?
> The quick way to get SDL is to put this:
> (define devices '(sdl alsa null))
> into a file called .openalrc in your home directory. If SDL isn't found
> it falls back to ALSA and then nothing.
> According to spec, you can use this line of code:
> alcGetString(NULL, ALC_DEVICE_SPECIFIER, devices);
> to get a NULL-delimited list of devices (terminated with a double-NULL)
> available on the system.
> Until recently, the sample implementation didn't have a real version of
> this enumeration mechanism (just a fake one that returned made-up device
> descriptions like the one above). Chris Robinson has recently
> contributed a patch to implement enumeration for real, but it hasn't
> been integrated yet. (We don't currently have a full-time maintainer,
> just a few guys with real jobs who do this in their non-existent free
> time :-) ).
> Hopefully within a week or two, the capability you're looking for will
> be there.
More information about the Openal