views:

44

answers:

1

I'm developing a Linux application on a computer with two audio cards and I want to use both at once in OpenAL, each in its own context. When I call OpenAL's enumeration extension, alcGetString(NULL, ALC_DEVICE_SPECIFIER), to get a list of possible output devices, the list only consists of 'ALSA Software' and 'OSS Software'. I know these are just OpenAL's view of software devices so when I choose either of these, OpenAL just outputs audio to the default device configured in ALSA or OSS. I'm not even sure if it's possible, but is there a way to direct the audio output of an OpenAL context to a specific device? This way I could create two contexts, one for each device, and send separate audio to each.

Thanks, -Al

A: 

I did some testing today and found the answer. Apparently, you have to call alcGetString with the argument ALC_ALL_DEVICES_SPECIFIER to get the complete listing. A simple enough change, but OpenAL's documentation on this functionality is at best cloudy and at worst misleading. See Section 9.5 of the OpenAL 1.1 Specification and the subsection "Creative Labs' Extenstions to OpenAL"->"Enumerate All Extension"->"Retrieving device names" of the OpenAL Programmer's Guide to see what I mean.

OpenAL documentation: http://connect.creativelabs.com/openal/Documentation/Forms/AllItems.aspx