Index: code/branches/core5/src/libraries/core/GameMode.cc
===================================================================
--- code/branches/core5/src/libraries/core/GameMode.cc	(revision 5877)
+++ code/branches/core5/src/libraries/core/GameMode.cc	(revision 5878)
@@ -27,9 +27,4 @@
  */
 
-/**
-    @file
-    @brief Implementation of the GameMode class.
-*/
-
 #include "GameMode.h"
 
@@ -37,4 +32,5 @@
 {
     bool GameMode::bShowsGraphics_s = false;
+    bool GameMode::bPlaysSound_s    = false;
     bool GameMode::bHasServer_s     = false;
     bool GameMode::bIsClient_s      = false;
Index: code/branches/core5/src/libraries/core/GameMode.h
===================================================================
--- code/branches/core5/src/libraries/core/GameMode.h	(revision 5877)
+++ code/branches/core5/src/libraries/core/GameMode.h	(revision 5878)
@@ -45,4 +45,5 @@
         public:
             static bool showsGraphics() { return bShowsGraphics_s; }
+            static bool playsSound()    { return bPlaysSound_s; }
             static bool hasServer()     { return bHasServer_s; }
             static bool isClient()      { return bIsClient_s; }
@@ -50,4 +51,5 @@
             static bool isMaster()      { return bIsMaster_s; }
 
+            static void setPlaysSound   (bool val) { bPlaysSound_s    = val; }
             static void setHasServer    (bool val) { bHasServer_s     = val; updateIsMaster(); }
             static void setIsClient     (bool val) { bIsClient_s      = val; updateIsMaster(); }
@@ -65,4 +67,5 @@
 
             static bool bShowsGraphics_s;                   //!< global variable that tells whether to show graphics
+            static bool bPlaysSound_s;                      //!< global variable that tells whether to sound works
             static bool bHasServer_s;                       //!< global variable that tells whether this is a server
             static bool bIsClient_s;
Index: code/branches/core5/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/core5/src/orxonox/gamestates/GSMainMenu.cc	(revision 5877)
+++ code/branches/core5/src/orxonox/gamestates/GSMainMenu.cc	(revision 5878)
@@ -59,10 +59,18 @@
         // and a Camera
         this->camera_ = this->scene_->getSceneManager()->createCamera("mainMenu/Camera");
-        // Load sound
-        this->ambient_ = new SoundMainMenu();
+        if (GameMode::playsSound())
+        {
+            // Load sound
+            this->ambient_ = new SoundMainMenu();
+        }
     }
 
     GSMainMenu::~GSMainMenu()
     {
+        if (GameMode::playsSound())
+        {
+            this->ambient_->destroy();
+        }
+
         InputManager::getInstance().destroyState("mainMenu");
 
@@ -87,10 +95,16 @@
         InputManager::getInstance().enterState("mainMenu");
 
-        this->ambient_->play(true);
+        if (GameMode::playsSound())
+        {
+            this->ambient_->play(true);
+        }
     }
 
     void GSMainMenu::deactivate()
     {
-        this->ambient_->stop();
+        if (GameMode::playsSound())
+        {
+            this->ambient_->stop();
+        }
 
         InputManager::getInstance().leaveState("mainMenu");
Index: code/branches/core5/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/core5/src/orxonox/sound/SoundManager.cc	(revision 5877)
+++ code/branches/core5/src/orxonox/sound/SoundManager.cc	(revision 5878)
@@ -31,5 +31,8 @@
 #include <AL/alut.h>
 
+#include "util/Exception.h"
 #include "util/Math.h"
+#include "util/ScopeGuard.h"
+#include "core/GameMode.h"
 #include "core/ScopedSingletonManager.h"
 #include "CameraManager.h"
@@ -42,54 +45,44 @@
     ManageScopedSingleton(SoundManager, ScopeID::Graphics, true);
 
-    /**
-     * Default constructor
-     */
     SoundManager::SoundManager()
     {
-        this->device_ = NULL;
-        this->soundavailable_ = true;
-        if(!alutInitWithoutContext(NULL,NULL))
-        {
-            COUT(2) << "Sound: OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
-            this->soundavailable_ = false;
-        }
+        if (!alutInitWithoutContext(NULL,NULL))
+            ThrowException(InitialisationFailed, "OpenAL ALUT error: " << alutGetErrorString(alutGetError()));
+        Loki::ScopeGuard alutExitGuard = Loki::MakeGuard(&alutExit);
+
+        COUT(3) << "OpenAL: Opening sound device..." << std::endl;
+        this->device_ = alcOpenDevice(NULL);
+        if (this->device_ == NULL)
+            ThrowException(InitialisationFailed, "OpenAL error: Could not open sound device.");
+        Loki::ScopeGuard closeDeviceGuard = Loki::MakeGuard(&alcCloseDevice, this->device_);
+
+        COUT(3) << "OpenAL: Sound device opened" << std::endl;
+        this->context_ = alcCreateContext(this->device_, NULL);
+        if (this->context_ == NULL)
+            ThrowException(InitialisationFailed, "OpenAL error: Could not create sound context");
+        Loki::ScopeGuard desroyContextGuard = Loki::MakeGuard(&alcDestroyContext, this->context_);
+
+        if (alcMakeContextCurrent(this->context_) == AL_TRUE)
+            COUT(3) << "OpenAL: Context " << this->context_ << " loaded" << std::endl;
+
+        COUT(4) << "Sound: OpenAL ALUT version: " << alutGetMajorVersion() << "." << alutGetMinorVersion() << std::endl;
+
+        const char* str = alutGetMIMETypes(ALUT_LOADER_BUFFER);
+        if (str == NULL)
+            COUT(2) << "OpenAL ALUT error: " << alutGetErrorString(alutGetError()) << std::endl;
         else
-        {
-            assert(this->device_ == NULL);
-            COUT(3) << "Sound: OpenAL: Open sound device..." << std::endl;
-            this->device_ = alcOpenDevice(NULL);
+            COUT(4) << "OpenAL ALUT supported MIME types: " << str << std::endl;
+        ThrowException(InitialisationFailed, "Just testing");
 
-            if(this->device_ == NULL)
-            {
-                COUT(2) << "Sound: OpenAL: Could not open sound device" << std::endl;
-                this->soundavailable_ = false;
-            }
-            else
-            {
-                COUT(3) << "Sound: OpenAL: Sound device opened" << std::endl;
-                this->context_ = alcCreateContext(this->device_, NULL);
-                if(this->context_ == NULL)
-                {
-                    COUT(2) << "Sound: OpenAL: Could not create sound context" << std::endl;
-                    this->soundavailable_ = false;
-                }
-                else
-                {
-                    if(alcMakeContextCurrent(this->context_) == AL_TRUE)
-                        COUT(3) << "Sound: OpenAL: Context " << this->context_ << " loaded" << std::endl;
-
-                    COUT(4) << "Sound: OpenAL ALUT version: " << alutGetMajorVersion() << "." << alutGetMinorVersion() << std::endl;
-                    const char* str = alutGetMIMETypes(ALUT_LOADER_BUFFER);
-                    if (str == NULL)
-                        COUT(2) << "Sound: OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
-                    else
-                        COUT(4) << "Sound: OpenAL ALUT supported MIME types: " << str << std::endl;
-                }
-            }
-        }
+        GameMode::setPlaysSound(true);
+        // Disarm guards
+        alutExitGuard.Dismiss();
+        closeDeviceGuard.Dismiss();
+        desroyContextGuard.Dismiss();
     }
 
     SoundManager::~SoundManager()
     {
+        GameMode::setPlaysSound(false);
         alcDestroyContext(this->context_);
         alcCloseDevice(this->device_);
