Index: code/branches/sound/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/sound/src/orxonox/CMakeLists.txt	(revision 2932)
+++ code/branches/sound/src/orxonox/CMakeLists.txt	(revision 2950)
@@ -58,5 +58,5 @@
   core
   network
-  #audio
+  sound
 )
 
Index: code/branches/sound/src/orxonox/objects/Level.cc
===================================================================
--- code/branches/sound/src/orxonox/objects/Level.cc	(revision 2932)
+++ code/branches/sound/src/orxonox/objects/Level.cc	(revision 2950)
@@ -77,4 +77,6 @@
         XMLPortParam(Level, "description", setDescription, getDescription, xmlelement, mode);
         XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
+        
+        XMLPortParamLoadOnly(Level, "ambientsound", loadAmbientSound, xmlelement, mode);
 
         XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
@@ -148,4 +150,20 @@
     }
 
+    void Level::loadAmbientSound(const std::string& filename)
+    {
+        if(filename == "") return;
+        else
+        {
+            if(this->ambientsound_ == NULL)
+            {
+                this->ambientsound_ = new SoundBase();
+                this->sndmgr_.addSound(this->ambientsound_);
+            }
+
+            this->ambientsound_->loadFile(filename);
+            this->ambientsound_->play();
+        }
+    }
+
     void Level::playerEntered(PlayerInfo* player)
     {
Index: code/branches/sound/src/orxonox/objects/Level.h
===================================================================
--- code/branches/sound/src/orxonox/objects/Level.h	(revision 2932)
+++ code/branches/sound/src/orxonox/objects/Level.h	(revision 2950)
@@ -33,4 +33,6 @@
 
 #include "network/synchronisable/Synchronisable.h"
+#include "sound/SoundBase.h"
+#include "sound/SoundManager.h"
 #include "core/BaseObject.h"
 
@@ -50,4 +52,6 @@
             inline const std::string& getDescription() const
                 { return this->description_; }
+
+            void loadAmbientSound(const std::string& filename);
 
             void playerEntered(PlayerInfo* player);
@@ -69,4 +73,6 @@
             XMLFile*               xmlfile_;
             std::list<BaseObject*> objects_;
+            SoundManager           sndmgr_;
+            SoundBase*             ambientsound_;
     };
 }
Index: code/branches/sound/src/sound/CMakeLists.txt
===================================================================
--- code/branches/sound/src/sound/CMakeLists.txt	(revision 2950)
+++ code/branches/sound/src/sound/CMakeLists.txt	(revision 2950)
@@ -0,0 +1,41 @@
+ #
+ #             ORXONOX - the hottest 3D action shooter ever to exist
+ #                             > www.orxonox.net <
+ #
+ #        This program is free software; you can redistribute it and/or
+ #         modify it under the terms of the GNU General Public License
+ #        as published by the Free Software Foundation; either version 2
+ #            of the License, or (at your option) any later version.
+ #
+ #       This program is distributed in the hope that it will be useful,
+ #        but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #                 GNU General Public License for more details.
+ #
+ #   You should have received a copy of the GNU General Public License along
+ #      with this program; if not, write to the Free Software Foundation,
+ #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #
+
+SET_SOURCE_FILES(SOUND_FILES
+    SoundManager.h
+    SoundBase.h
+
+    SoundManager.cc
+    SoundBase.cc
+)
+GENERATE_SOURCE_GROUPS(${SOUND_FILES})
+
+
+ADD_LIBRARY(sound SHARED ${SOUND_FILES})
+TARGET_LINK_LIBRARIES(sound
+  ${OPENAL_LIBRARY}
+  ${ALUT_LIBRARY}
+  #${VORBISFILE_LIBRARY}
+  #${VORBIS_LIBRARY}
+  #${OGG_LIBRARY}
+  core
+  util
+)
+
+ORXONOX_INSTALL(sound)
Index: code/branches/sound/src/sound/SoundBase.cc
===================================================================
--- code/branches/sound/src/sound/SoundBase.cc	(revision 2932)
+++ code/branches/sound/src/sound/SoundBase.cc	(revision 2950)
@@ -34,4 +34,10 @@
 namespace orxonox 
 {
+    SoundBase::SoundBase()
+    {
+        this->source_ = 0;
+        this->buffer_ = 0;
+        this->entity_ = NULL;
+    }
     SoundBase::SoundBase(WorldEntity* entity)
     {
@@ -39,7 +45,4 @@
         this->buffer_ = 0;
         this->entity_ = entity;
-
-        if(SoundBase::soundmanager_s == NULL)
-            SoundBase::soundmanager_s = SoundManager::instance();
     }
 
@@ -51,5 +54,5 @@
 
     void SoundBase::update() {
-        if(alIsSource(this->source_)) {
+        if(this->entity_ != NULL && alIsSource(this->source_)) {
             Vector3 pos = this->entity_->getPosition();
             alSource3f(this->source_, AL_POSITION, pos.x, pos.y, pos.z);
@@ -99,4 +102,5 @@
             return getSourceState() == AL_PLAYING;
         }
+        return false;
     }
 
@@ -105,4 +109,5 @@
             return getSourceState() == AL_PAUSED;
         }
+        return true;
     }
 
@@ -111,10 +116,12 @@
             return getSourceState() == AL_INITIAL || getSourceState() == AL_STOPPED;
         }
+        return true;
     }
 
     bool SoundBase::loadFile(std::string filename) {
+        COUT(3) << "OpenAL ALUT: loading file " << filename << std::endl;
         this->buffer_ = alutCreateBufferFromFile(filename.c_str());
         if(this->buffer_ == AL_NONE) {
-            COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError());
+            COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
             return false;
         }
@@ -123,5 +130,5 @@
         alSourcei(this->source_, AL_BUFFER, this->buffer_);
         if(alGetError() != AL_NO_ERROR) {
-            COUT(2) << "OpenAL: Error loading sample file";
+            COUT(2) << "OpenAL: Error loading sample file" << std::endl;
             return false;
         }
Index: code/branches/sound/src/sound/SoundBase.h
===================================================================
--- code/branches/sound/src/sound/SoundBase.h	(revision 2932)
+++ code/branches/sound/src/sound/SoundBase.h	(revision 2950)
@@ -45,6 +45,6 @@
     {
     public:
+        SoundBase();
         SoundBase(WorldEntity* entity);
-        ~SoundBase();
 
         void attachToEntity(WorldEntity* entity);
@@ -65,6 +65,4 @@
         WorldEntity* entity_;
 
-        static SoundManager* soundmanager_s;
-
         ALint getSourceState();
     }; // class SoundBase
Index: code/branches/sound/src/sound/SoundManager.cc
===================================================================
--- code/branches/sound/src/sound/SoundManager.cc	(revision 2932)
+++ code/branches/sound/src/sound/SoundManager.cc	(revision 2950)
@@ -38,19 +38,4 @@
 {
     /**
-     * Static function to get the singleton instance of SoundManager.
-     *
-     * @return The singleton instance
-     */
-    SoundManager* SoundManager::instance()
-    {
-        if(SoundManager::singleton_ == NULL)
-        {
-            SoundManager::singleton_ = new SoundManager();
-        }
-
-        return SoundManager::singleton_;
-    }
-
-    /**
      * Default constructor
      */
@@ -58,6 +43,9 @@
     {
         if(!alutInit(NULL,NULL)) {
-            COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError());
+            COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
         }
+
+        COUT(4) << "OpenAL ALUT version:" << alutGetMajorVersion() << "." << alutGetMinorVersion() << std::endl;
+        COUT(4) << "OpenAL ALUT supported MIME types:" << alutGetMIMETypes(ALUT_LOADER_BUFFER) << std::endl;
     }
 
@@ -98,4 +86,5 @@
         // update listener position
         Camera* camera = CameraManager::getInstance().getActiveCamera();
+        if(camera == NULL) return;
         Vector3 pos = camera->getPosition();
         alListener3f(AL_POSITION, pos.x, pos.y, pos.z);
Index: code/branches/sound/src/sound/SoundManager.h
===================================================================
--- code/branches/sound/src/sound/SoundManager.h	(revision 2932)
+++ code/branches/sound/src/sound/SoundManager.h	(revision 2950)
@@ -46,15 +46,11 @@
     {
     public:
-        static SoundManager* instance();
-        
+        SoundManager();
         void addSound(SoundBase* sound);
         void removeSound(SoundBase* sound);
-        
+
         virtual void tick(float dt);
 
     private:
-        SoundManager(); // private constructor -> singleton
-        static SoundManager* singleton_;
-
         std::list<SoundBase*> soundlist_;
 
Index: code/branches/sound/src/sound/copyheader
===================================================================
--- code/branches/sound/src/sound/copyheader	(revision 2932)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *       Erwin 'vaiursch' Herrsche
- *   Co-authors:
- *      ...
- *
- */
-
