There were some inconsistencies in the way that the device list was generated.
OgreOggSoundManager::init was calling OgreOggSoundManager::_enumDevices() but its result was not being used (Now it is used as the source of truth)
The function OgreOggSoundManager::getDeviceList() had initialization code to test the devices, which is unexpected behaviour for a get*() function, now it only returns the list
The previous version of OgreOggSoundManager::getDeviceList() was creating and destroying ALContext for each device to sort of "test" it, but in practice it makes more sense to just get the device list and fail later in the initialization if we are unable to create the context for that particular device.
With these changes it is now safe to call OgreOggSoundManager::getDeviceList(), I was having problems with it previously.
The code now resembles the way in which OpenAL Soft is initialized in the openal-info.c example.
There were some inconsistencies in the way that the device list was generated.
OgreOggSoundManager::init
was callingOgreOggSoundManager::_enumDevices()
but its result was not being used (Now it is used as the source of truth) The functionOgreOggSoundManager::getDeviceList()
had initialization code to test the devices, which is unexpected behaviour for aget*()
function, now it only returns the list The previous version ofOgreOggSoundManager::getDeviceList()
was creating and destroyingALContext
for each device to sort of "test" it, but in practice it makes more sense to just get the device list and fail later in the initialization if we are unable to create the context for that particular device.With these changes it is now safe to call
OgreOggSoundManager::getDeviceList()
, I was having problems with it previously.The code now resembles the way in which OpenAL Soft is initialized in the
openal-info.c
example.