openal_fall_back_to_default_device.diff
b/code/nel/src/sound/driver/openal/sound_driver_al.cpp Thu Sep 27 21:08:32 2012 +0200 | ||
---|---|---|
246 | 246 |
if (AlEnumerateAllExt) |
247 | 247 |
{ |
248 | 248 |
const ALchar* deviceNames = alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER); |
249 |
// const ALchar* defaultDevice = NULL; |
|
250 | 249 |
if(!strlen(deviceNames)) |
251 | 250 |
{ |
252 | 251 |
nldebug("AL: No audio devices"); |
... | ... | |
291 | 290 | |
292 | 291 |
// OpenAL initialization |
293 | 292 |
const ALchar *dev = getDeviceInternal(device); |
293 |
if (!dev) dev = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); |
|
294 | 294 |
nldebug("AL: Opening device: '%s'", dev == NULL ? "NULL" : dev); |
295 | 295 |
_AlDevice = alcOpenDevice(dev); |
296 | 296 |
if (!_AlDevice) throw ESoundDriver("AL: Failed to open device"); |