[Orxonox-commit 4232] r8903 - code/trunk/src/orxonox/sound

baermatt at orxonox.net baermatt at orxonox.net
Sat Oct 22 15:28:36 CEST 2011


Author: baermatt
Date: 2011-10-22 15:28:35 +0200 (Sat, 22 Oct 2011)
New Revision: 8903

Modified:
   code/trunk/src/orxonox/sound/SoundManager.cc
Log:
Just excluding alutInit and alutExit on Mac OS X, because it causes an internal warning.

Modified: code/trunk/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/trunk/src/orxonox/sound/SoundManager.cc	2011-10-21 15:05:55 UTC (rev 8902)
+++ code/trunk/src/orxonox/sound/SoundManager.cc	2011-10-22 13:28:35 UTC (rev 8903)
@@ -79,9 +79,11 @@
         SetConfigValue(bDisableSound_, false);
         if (bDisableSound_)
             ThrowException(InitialisationAborted, "Sound: Not loading at all");
-/*      if (!alutInitWithoutContext(NULL, NULL))
+#if !defined(ORXONOX_PLATFORM_APPLE)
+        if (!alutInitWithoutContext(NULL, NULL))
             ThrowException(InitialisationFailed, "Sound Error: ALUT initialisation failed: " << alutGetErrorString(alutGetError()));
-        Loki::ScopeGuard alutExitGuard = Loki::MakeGuard(&alutExit);*/
+        Loki::ScopeGuard alutExitGuard = Loki::MakeGuard(&alutExit);
+#endif
 
 /*
         // Get list of available sound devices and display them
@@ -148,7 +150,9 @@
         this->createSoundSources(this->minSources_ - 1);
 
         // Disarm guards
-//      alutExitGuard.Dismiss();
+#if !defined(ORXONOX_PLATFORM_APPLE)
+        alutExitGuard.Dismiss();
+#endif
         closeDeviceGuard.Dismiss();
         desroyContextGuard.Dismiss();
         resetPlaysSoundGuard.Dismiss();
@@ -198,8 +202,10 @@
 #else
         alcCloseDevice(this->device_);
 #endif
-/*      if (!alutExit())
-            orxout(internal_error, context::sound) << "Closing ALUT failed: " << alutGetErrorString(alutGetError()) << endl;*/
+#if !defined(ORXONOX_PLATFORM_APPLE)
+        if (!alutExit())
+            orxout(internal_error, context::sound) << "Closing ALUT failed: " << alutGetErrorString(alutGetError()) << endl;
+#endif
     }
 
     void SoundManager::setConfigValues()




More information about the Orxonox-commit mailing list