[Openal-devel] OpenAL doesn't find my sounddevice

Chris Robinson chris.kcat at gmail.com
Mon Jul 16 11:45:25 PDT 2007


On Monday 16 July 2007 06:06:43 am Philipp Neuhaus wrote:
> Hi,
>
> I'm using the OgreAL-Head on Ubuntu 7.04 /Feisty.
>
> OgreAL uses this function to get a list of my sound devices:
>
> ALCdevice *device = alcOpenDevice(NULL);
>
>         Ogre::LogManager::getSingleton().logMessage("Choosing: " +
> Ogre::String(alcGetString(device, ALC_DEVICE_SPECIFIER)));
>
>
> But that returns nothing.
>
> Do you know where I may search for the error?

alcOpenDevice sets the device's specifier string to whatever you passed to 
alcOpenDevice. When you pass NULL, it sets an empty string.

I think the device string handling can be reworked a bit to be more dynamic 
(remove the "Default" device string, and query the list of backends to build 
a list of device names, etc). I'll see what I can do about getting a patch 
for that, but it might conflict with some changes that are waiting to be 
applied.


In the mean time, you can call
alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
to get the default device name, then pass that to alcOpenDevice (passing NULL 
should be the same as passing the default), which should create the device 
using its name.


More information about the Openal-devel mailing list