Game Development Community

TGE fails OpenAL Soft device initialization

by Jamin Collins · in Torque Game Engine · 11/19/2008 (4:56 pm) · 0 replies

Ubuntu's 8.10 release ships with a new implementation of openal (openal soft). With the new implementation, TGE fails to initialize the audio device. Reverting the Linux portion of the openal device specification appears to fix this.

diff -Naur Torque1.5.2-Linux.orig/engine/audio/audio.cc Torque1.5.2-Linux/engine/audio/audio.cc
--- Torque1.5.2-Linux.orig/engine/audio/audio.cc	2007-05-31 16:56:56.000000000 -0400
+++ Torque1.5.2-Linux/engine/audio/audio.cc	2008-11-19 18:25:32.000000000 -0500
@@ -2371,16 +2371,7 @@
       return false;
 
    // Open a device
-#ifdef TORQUE_OS_LINUX
-   const char* deviceSpecifier =
-     Con::getVariable("Pref::Unix::OpenALSpecifier");
-   if (dStrlen(deviceSpecifier) == 0)
-     // use SDL for audio output by default
-     deviceSpecifier = "'((devices '(sdl)))";
-   mDevice = (ALCdevice *)alcOpenDevice((ALubyte*)deviceSpecifier);
-#else
    mDevice = (ALCdevice *)alcOpenDevice((ALubyte*)NULL);
-#endif
    if (mDevice == (ALCdevice *)NULL)
       return false;