[openal] Incorrect Device Names

Tommy Scott tscott at magiqueproductions.com
Fri Sep 2 00:00:23 EDT 2016


I wanted to make one more comment regarding this. Technically, OpenAL 
Soft is implementing this incorrectly according to the OpenAL 
Programmer's Guide. In there it states the following:

ALC_DEVICE_SPECIFIER will return the name of the specified output device 
if a pointer is supplied

And furthermore:

          Checking the current device name
The developer can check to see the name of the device that was actually 
opened using the function call alcGetString with a pointer to an open 
device and the name
“ALC_DEVICE_SPECIFIER”.

ALCdevice *pMyDevice;
const ALCchar *actualDeviceName;

// Open the default device
pMyDevice=alcOpenDevice(NULL)

// Pass in valid device pointer to get the name of the open
// device

actualDeviceName = alcGetString(pMyDevice, ALC_DEVICE_SPECIFIER);
// actualDeviceName contains the name of the open device

And this is exactly how sample code is used provided in the original 
OpenAL SDK. So this should give the full device name, not just some 
driver specifier. I think that changing this behavior was not a good 
thing. Perhaps a different enumeration should be used for just getting 
the driver specifier.

Tommy


On 9/1/2016 7:48 PM, Chris Robinson wrote:
> On 09/01/2016 08:34 AM, Tommy Scott wrote:
>> When I enumerate all the available devices they all come back with a
>> strDeviceName equal to "OpenAL Soft" instead of the actual device name.
>
> ALC_DEVICE_SPECIFIER effectively acts as a driver specifier. You'll 
> get names like "Generic Software", "Generic Hardware", "OpenAL Soft", 
> etc. You may see specific device names if you have a hardware OpenAL 
> driver for your audio card, though.
>
> Otherwise, you should use the ALC_ENUMERATE_ALL_EXT extension's 
> ALC_ALL_DEVICES_SPECIFIER to get the specific output. Then you'll get 
> names like "OpenAL Soft on Some Device".
>
>> Strangely, if I
>> change the call to ||alcGetString(device, ALC_ALL_DEVICES_SPECIFIER)
>> then it returns thje correct name for the device, but then when using
>> that name to open the device it doesn't allow the device to play sounds.
>
> That's odd, you should be able to open the specific names you get from 
> that. What name do you get? What happens when you try to open a device 
> with the name? Does the device open and the context get created, or 
> does one of them fail, or...?
>
> It may help to get logging output, which you can do by setting the 
> ALSOFT_LOGLEVEL environment variable to 3, then capturing stderr when 
> running the app (or also set the ALSOFT_LOGFILE environment variable 
> to a path with filename, where the log can be written to).
> _______________________________________________
> openal mailing list
> openal at openal.org
> http://openal.org/mailman/listinfo/openal


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openal.org/pipermail/openal/attachments/20160901/9c6afd73/attachment-0001.html>


More information about the openal mailing list