Index: trunk/src/lib/sound/sound_engine.cc
===================================================================
--- trunk/src/lib/sound/sound_engine.cc	(revision 6844)
+++ trunk/src/lib/sound/sound_engine.cc	(revision 6846)
@@ -162,17 +162,17 @@
   // updating the Listeners Position
   if (likely(this->listener != NULL))
-    {
-      alListener3f(AL_POSITION,
-                   this->listener->getAbsCoor().x,
-                   this->listener->getAbsCoor().y,
-                   this->listener->getAbsCoor().z);
-      alListener3f(AL_VELOCITY,
-                   this->listener->getVelocity().x,
-                   this->listener->getVelocity().y,
-                   this->listener->getVelocity().z);
-      Vector absDirV = this->listener->getAbsDirV();
-      ALfloat orientation [6] = {1,0,0, absDirV.x, absDirV.y, absDirV.z};
-      alListenerfv(AL_ORIENTATION, orientation);
-    }
+  {
+    alListener3f(AL_POSITION,
+                 this->listener->getAbsCoor().x,
+                 this->listener->getAbsCoor().y,
+                 this->listener->getAbsCoor().z);
+    alListener3f(AL_VELOCITY,
+                 this->listener->getVelocity().x,
+                 this->listener->getVelocity().y,
+                 this->listener->getVelocity().z);
+    Vector absDirV = this->listener->getAbsDirV();
+    ALfloat orientation [6] = {1,0,0, absDirV.x, absDirV.y, absDirV.z};
+    alListenerfv(AL_ORIENTATION, orientation);
+  }
   else
     PRINTF(2)("no listener defined\n");
@@ -220,25 +220,25 @@
 {
   /// FIXME
-/*  if(this->sourceList && this->bufferList)
-  {
-    tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator();
-    SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement();
-    while (enumBuffer)
-    {
-      tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator();
-      SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement();
-      while (enumSource)
+  /*  if(this->sourceList && this->bufferList)
+    {
+      tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator();
+      SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement();
+      while (enumBuffer)
       {
-        if (enumBuffer == enumSource->getBuffer())
-          break;
-        enumSource = (SoundSource*)sourceIterator->nextElement();
+        tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator();
+        SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement();
+        while (enumSource)
+        {
+          if (enumBuffer == enumSource->getBuffer())
+            break;
+          enumSource = (SoundSource*)sourceIterator->nextElement();
+        }
+        delete sourceIterator;
+        if (enumSource == NULL)
+          ResourceManager::getInstance()->unload(enumBuffer);
+        enumBuffer = (SoundBuffer*)bufferIterator->nextElement();
       }
-      delete sourceIterator;
-      if (enumSource == NULL)
-        ResourceManager::getInstance()->unload(enumBuffer);
-      enumBuffer = (SoundBuffer*)bufferIterator->nextElement();
-    }
-    delete bufferIterator;
-}*/ /// FIXME
+      delete bufferIterator;
+  }*/ /// FIXME
 }
 
@@ -278,6 +278,6 @@
   const char* deviceList = (const char*)alcGetString(NULL,ALC_DEVICE_SPECIFIER);
   const char* devWalk = deviceList;
-//  if (alcIsExtensionPresent(NULL, (const ALCchar*)"ALC_ENUMERATION_EXT") == AL_TRUE)
-{ // try out enumeration extension
+  //  if (alcIsExtensionPresent(NULL, (const ALCchar*)"ALC_ENUMERATION_EXT") == AL_TRUE)
+  { // try out enumeration extension
     PRINTF(3)("Enumeration-extension found\n");
 
@@ -287,5 +287,6 @@
       PRINTF(3)("%s\n", devWalk);
       devWalk += strlen(devWalk)+1;
-    } while (devWalk[0] != '\0');
+    }
+    while (devWalk[0] != '\0');
 
 
@@ -293,20 +294,20 @@
   }
   // INITIALIZING THE DEVICE:
-/*
-#ifdef AL_VERSION_1_1
-  ALCchar deviceName[] =
-
-#ifdef __WIN32__
-      "Direct3D";
-#else
-      "'( ( devices '( native null ) ) )";
-#endif
-  //
-  this->device = alcOpenDevice(deviceName);
-
-  this->context = alcCreateContext(this->device, NULL);
-
-  alcMakeContextCurrent(this->context);
-#else*/
+  /*
+  #ifdef AL_VERSION_1_1
+    ALCchar deviceName[] =
+
+  #ifdef __WIN32__
+        "Direct3D";
+  #else
+        "'( ( devices '( native null ) ) )";
+  #endif
+    //
+    this->device = alcOpenDevice(deviceName);
+
+    this->context = alcCreateContext(this->device, NULL);
+
+    alcMakeContextCurrent(this->context);
+  #else*/
   this->device = alcOpenDevice(NULL);
   SoundEngine::checkError("Error opening Device", __LINE__);
@@ -315,5 +316,5 @@
   alcMakeContextCurrent(this->context);
   this->checkError("Making Context Current", __LINE__);
-// #endif
+  // #endif
 
   if ((result = alGetError()) != AL_NO_ERROR)
@@ -378,5 +379,5 @@
 {
   switch(err)
-    {
+  {
     case AL_NO_ERROR:
       return ("AL_NO_ERROR");
@@ -391,5 +392,5 @@
     case AL_OUT_OF_MEMORY:
       return ("AL_OUT_OF_MEMORY");
-    };
+  };
 }
 
