Index: code/branches/sound3/src/orxonox/sound/AmbientSound.cc
===================================================================
--- code/branches/sound3/src/orxonox/sound/AmbientSound.cc	(revision 5962)
+++ code/branches/sound3/src/orxonox/sound/AmbientSound.cc	(revision 5982)
@@ -32,4 +32,5 @@
 #include "core/EventIncludes.h"
 #include "core/XMLPort.h"
+#include "SoundManager.h"
 
 namespace orxonox
@@ -60,3 +61,41 @@
         XMLPortEventState(AmbientSound, BaseObject, "play", play, xmlelement, mode);
     }
+
+    void AmbientSound::play()
+    {
+        COUT(3) << this->getSource() << ": Playing" << std::endl;
+        SoundManager::getInstance().registerAmbientSound(this);
+        SUPER(AmbientSound, play);
+    }
+
+    void AmbientSound::replay()
+    {
+        SUPER(AmbientSound, play);
+    }
+
+    void AmbientSound::stop()
+    {
+        SUPER(AmbientSound, stop);
+        SoundManager::getInstance().unregisterAmbientSound(this);
+    }
+
+    void AmbientSound::pause()
+    {
+        SUPER(AmbientSound, pause);
+    }
+
+    void AmbientSound::changedActivity() 
+    {
+        COUT(3) << this->getSource() << ": ChangedActivity: " << this->isActive() << std::endl;
+        SUPER(AmbientSound, changedActivity);
+        if(this->isActive())
+        {
+            this->play();
+        }
+        else 
+        {
+            this->stop();
+        }
+    }
+
 }
Index: code/branches/sound3/src/orxonox/sound/AmbientSound.h
===================================================================
--- code/branches/sound3/src/orxonox/sound/AmbientSound.h	(revision 5962)
+++ code/branches/sound3/src/orxonox/sound/AmbientSound.h	(revision 5982)
@@ -47,6 +47,13 @@
         virtual ~AmbientSound();
 
+        virtual void play();
+        virtual void replay();      // is only needed for the AmbientSound list in SoundManager
+        virtual void stop();
+        virtual void pause();
+
         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
         virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+        virtual void changedActivity();
+
 
     private:
Index: code/branches/sound3/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/sound3/src/orxonox/sound/BaseSound.cc	(revision 5962)
+++ code/branches/sound3/src/orxonox/sound/BaseSound.cc	(revision 5982)
@@ -70,4 +70,9 @@
     }
 
+    void BaseSound::replay()
+    {
+        BaseSound::play();
+    }
+
     void BaseSound::stop()
     {
@@ -105,6 +110,9 @@
     void BaseSound::setPlayOnLoad(bool val)
     {
-        this->bPlayOnLoad_ = true;
-        this->play();
+        this->bPlayOnLoad_ = val;
+        if(val)
+        {
+            this->play();
+        }
     }
 
Index: code/branches/sound3/src/orxonox/sound/BaseSound.h
===================================================================
--- code/branches/sound3/src/orxonox/sound/BaseSound.h	(revision 5962)
+++ code/branches/sound3/src/orxonox/sound/BaseSound.h	(revision 5982)
@@ -49,7 +49,8 @@
         virtual ~BaseSound();
 
-        void play();
-        void stop();
-        void pause();
+        virtual void play();
+        virtual void replay();      // is only needed for the AmbientSound list in SoundManager
+        virtual void stop();
+        virtual void pause();
 
         bool isPlaying();
Index: code/branches/sound3/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/sound3/src/orxonox/sound/SoundManager.cc	(revision 5962)
+++ code/branches/sound3/src/orxonox/sound/SoundManager.cc	(revision 5982)
@@ -36,4 +36,5 @@
 #include "core/GameMode.h"
 #include "core/ScopedSingletonManager.h"
+#include "BaseSound.h"
 
 namespace orxonox
@@ -114,3 +115,32 @@
             COUT(2) << "Sound: OpenAL: Invalid listener orientation" << std::endl;
     }
+
+    void SoundManager::registerAmbientSound(BaseSound* newAmbient)
+    {
+        if (!(this->ambientSounds_.empty())) 
+        {
+            this->ambientSounds_.front()->pause();
+        }
+        this->ambientSounds_.push_front(newAmbient);
+    }
+
+    void SoundManager::unregisterAmbientSound(BaseSound* currentAmbient)
+    {
+        if(this->ambientSounds_.front() == currentAmbient) 
+        {
+            this->ambientSounds_.pop_front();
+            this->ambientSounds_.front()->replay();
+        }
+        else
+        {
+            for(std::list<BaseSound*>::iterator it= this->ambientSounds_.begin(); it != this->ambientSounds_.end(); it++)
+            {
+                if(*it == currentAmbient)
+                {
+                    this->ambientSounds_.erase(it);
+                    break;
+                }
+            }
+        }
+    }
 }
Index: code/branches/sound3/src/orxonox/sound/SoundManager.h
===================================================================
--- code/branches/sound3/src/orxonox/sound/SoundManager.h	(revision 5962)
+++ code/branches/sound3/src/orxonox/sound/SoundManager.h	(revision 5982)
@@ -51,8 +51,11 @@
         void setListenerPosition(const Vector3& position);
         void setListenerOrientation(const Quaternion& orientation);
+        void registerAmbientSound(BaseSound* newAmbient);
+        void unregisterAmbientSound(BaseSound* currentAmbient);
 
     private:
         ALCdevice* device_;
         ALCcontext* context_;
+        std::list<BaseSound*> ambientSounds_;
 
         static SoundManager* singletonPtr_s;
