Index: code/branches/presentation2/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/presentation2/src/orxonox/sound/BaseSound.cc	(revision 6183)
+++ code/branches/presentation2/src/orxonox/sound/BaseSound.cc	(revision 6184)
@@ -109,5 +109,24 @@
         this->volume_ = vol;
         if (alIsSource(this->audioSource_))
-            alSourcef(this->audioSource_, AL_GAIN, vol);
+            alSourcef(this->audioSource_, AL_GAIN, this->getEffectiveVolume());
+    }
+    
+    void BaseSound::setVolumeGain(float gain)
+    {
+        COUT(1) << "blubb: " << gain << std::endl;
+        if (gain > 1 || gain < 0)
+        {
+            COUT(2) << "Sound warning: volume gain out of range, cropping value." << std::endl;
+            gain = gain > 1 ? 1 : gain;
+            gain = gain < 0 ? 0 : gain;
+        }
+        this->volumeGain_ = gain;
+        if (alIsSource(this->audioSource_))
+            alSourcef(this->audioSource_, AL_GAIN, this->getEffectiveVolume());
+    }
+    
+    float BaseSound::getEffectiveVolume(void)
+    {
+        return this->volume_*this->volumeGain_;
     }
 
@@ -181,5 +200,5 @@
 
         alSource3f(this->audioSource_, AL_POSITION,  0, 0, 0);
-        alSourcef (this->audioSource_, AL_GAIN, this->volume_);
+        alSourcef (this->audioSource_, AL_GAIN, this->getEffectiveVolume());
         alSourcei (this->audioSource_, AL_LOOPING, (this->bLoop_ ? AL_TRUE : AL_FALSE));
         if (this->isPlaying() || this->isPaused())
Index: code/branches/presentation2/src/orxonox/sound/BaseSound.h
===================================================================
--- code/branches/presentation2/src/orxonox/sound/BaseSound.h	(revision 6183)
+++ code/branches/presentation2/src/orxonox/sound/BaseSound.h	(revision 6184)
@@ -64,4 +64,10 @@
         void setVolume(float vol);
         float getVolume() const { return this->volume_; }
+        
+        void setVolumeGain(float gain);
+        inline float getVolumeGain()
+            { return this->volumeGain_; }
+            
+        float getEffectiveVolume(void);
 
         bool getLooping() const   { return this->bLoop_; }
@@ -86,4 +92,5 @@
         std::string     source_;
         float           volume_;
+        float           volumeGain_;
         bool            bLoop_;
         State           state_;
Index: code/branches/presentation2/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/presentation2/src/orxonox/sound/SoundManager.cc	(revision 6183)
+++ code/branches/presentation2/src/orxonox/sound/SoundManager.cc	(revision 6184)
@@ -43,4 +43,5 @@
 #include "BaseSound.h"
 #include "AmbientSound.h"
+#include "WorldSound.h"
 
 namespace orxonox
@@ -90,4 +91,8 @@
         closeDeviceGuard.Dismiss();
         desroyContextGuard.Dismiss();
+        
+        this->volume_ = 1.0;
+        this->ambientVolume_ = 1.0;
+        this->effectsVolume_ = 1.0;
 
         this->setConfigValues();
@@ -112,4 +117,16 @@
             .description("Determines how fast sounds should fade, per second.")
             .callback(this, &SoundManager::checkFadeStepValidity);
+            
+        SetConfigValue(volume_, 1.0f)
+            .description("Defines the overall volume.")
+            .callback(this, &SoundManager::checkVolumeValidity);
+            
+        SetConfigValue(ambientVolume_, 1.0f)
+            .description("Defines the ambient volume.")
+            .callback(this, &SoundManager::checkAmbientVolumeValidity);
+            
+        SetConfigValue(effectsVolume_, 1.0f)
+            .description("Defines the effects volume.")
+            .callback(this, &SoundManager::checkEffectsVolumeValidity);
     }
 
@@ -122,4 +139,43 @@
         }
         COUT(3) << "SoundManager: fade step set to " << crossFadeStep_ << std::endl;
+        return;
+    }
+    
+    void SoundManager::checkVolumeValidity()
+    {
+        if(volume_ < 0.0 || volume_ > 1.0)
+        {
+            COUT(2) << "Sound warning: Sound volume out of range, ignoring change." << std::endl;
+            ResetConfigValue(volume_);
+        }
+        
+        this->updateVolume();
+        COUT(3) << "SoundManager: Overall volume set to " << volume_ << std::endl;
+        return;
+    }
+    
+    void SoundManager::checkAmbientVolumeValidity()
+    {
+        if(this->ambientVolume_ < 0.0 || this->ambientVolume_ > 1.0)
+        {
+            COUT(2) << "Sound warning: Ambient volume out of range, ignoring change." << std::endl;
+            ResetConfigValue(ambientVolume_);
+        }
+        
+        this->updateAmbientVolume();
+        COUT(3) << "SoundManager: Ambient volume set to " << this->ambientVolume_ << std::endl;
+        return;
+    }
+    
+    void SoundManager::checkEffectsVolumeValidity()
+    {
+        if(this->effectsVolume_ < 0.0 || this->effectsVolume_ > 1.0)
+        {
+            COUT(2) << "Sound warning: effects volume out of range, ignoring change." << std::endl;
+            ResetConfigValue(effectsVolume_);
+        }
+        
+        this->updateEffectsVolume();
+        COUT(3) << "SoundManager: Effects volume set to " << this->effectsVolume_ << std::endl;
         return;
     }
@@ -218,4 +274,58 @@
             }
         }
+    }
+    
+    void SoundManager::setAmbientVolume(float vol)
+    {
+        if (vol > 1 || vol < 0)
+        {
+            COUT(2) << "Sound warning: volume out of range, cropping value." << std::endl;
+            vol = vol > 1 ? 1 : vol;
+            vol = vol < 0 ? 0 : vol;
+        }
+        this->ambientVolume_ = vol;
+        
+        this->updateAmbientVolume();
+    }
+    
+    void SoundManager::setEffectsVolume(float vol)
+    {
+        if (vol > 1 || vol < 0)
+        {
+            COUT(2) << "Sound warning: volume out of range, cropping value." << std::endl;
+            vol = vol > 1 ? 1 : vol;
+            vol = vol < 0 ? 0 : vol;
+        }
+        this->effectsVolume_ = vol;
+        
+        this->updateEffectsVolume();
+    }
+    
+    void SoundManager::setVolume(float vol)
+    {
+        if (vol > 1 || vol < 0)
+        {
+            COUT(2) << "Sound warning: volume out of range, cropping value." << std::endl;
+            vol = vol > 1 ? 1 : vol;
+            vol = vol < 0 ? 0 : vol;
+        }
+        this->volume_ = vol;
+        
+        this->updateVolume();
+    }
+    
+    float SoundManager::getAmbientVolume(void)
+    {
+        return this->ambientVolume_;
+    }
+    
+    float SoundManager::getEffectsVolume(void)
+    {
+        return this->effectsVolume_;
+    }
+    
+    float SoundManager::getVolume(void) 
+    {
+        return this->volume_;
     }
 
@@ -305,3 +415,40 @@
         }
     }
+    
+    void SoundManager::updateAmbientVolume(void)
+    {
+        for(ObjectList<AmbientSound>::iterator it = ObjectList<AmbientSound>::begin(); it != ObjectList<AmbientSound>::end(); ++it)
+        {
+            (*it)->setVolumeGain(this->volume_*this->ambientVolume_);
+        }
+    }
+    
+    void SoundManager::updateEffectsVolume(void)
+    {
+        for (ObjectList<WorldSound>::iterator it = ObjectList<WorldSound>::begin(); it != ObjectList<WorldSound>::end(); ++it)
+        {
+            (*it)->setVolumeGain(this->volume_*this->effectsVolume_);
+        }
+    }
+    
+    void SoundManager::updateVolume(void)
+    {
+        for (ObjectList<BaseSound>::iterator it = ObjectList<BaseSound>::begin(); it != ObjectList<BaseSound>::end(); ++it)
+        {
+            AmbientSound* ambient = dynamic_cast<AmbientSound*>(*it);
+            WorldSound* world = dynamic_cast<WorldSound*>(*it);
+            if(ambient != NULL)
+            {
+                ambient->setVolumeGain(this->volume_*this->ambientVolume_);
+            }
+            else if(world != NULL)
+            {
+                world->setVolumeGain(this->volume_*this->effectsVolume_);
+            }
+            else
+            {
+                (*it)->setVolumeGain(this->volume_);
+            }
+        }
+    }
 }
Index: code/branches/presentation2/src/orxonox/sound/SoundManager.h
===================================================================
--- code/branches/presentation2/src/orxonox/sound/SoundManager.h	(revision 6183)
+++ code/branches/presentation2/src/orxonox/sound/SoundManager.h	(revision 6184)
@@ -35,5 +35,7 @@
 #include <string>
 #include "util/Singleton.h"
+#include "core/OrxonoxClass.h"
 
+// tolua_begin
 namespace orxonox
 {
@@ -43,6 +45,8 @@
      *
      */
-    class _OrxonoxExport SoundManager : public Singleton<SoundManager>, public OrxonoxClass
-    {
+    class _OrxonoxExport SoundManager
+    // tolua_end
+        : public Singleton<SoundManager>, public OrxonoxClass
+    { // tolua_export
         friend class Singleton<SoundManager>;
 
@@ -53,4 +57,6 @@
         void preUpdate(const Clock& time);
         void setConfigValues();
+        
+        static SoundManager& getInstance() { return Singleton<SoundManager>::getInstance(); } // tolua_export
 
         void setListenerPosition(const Vector3& position);
@@ -60,4 +66,12 @@
         void unregisterAmbientSound(AmbientSound* oldAmbient);
         void pauseAmbientSound(AmbientSound* ambient);
+        
+        void setAmbientVolume(float vol); // tolua_export
+        void setEffectsVolume(float vol); // tolua_export
+        void setVolume(float vol); // tolua_export
+        
+        float getAmbientVolume(void); // tolua_export
+        float getEffectsVolume(void); // tolua_export
+        float getVolume(void); // tolua_export
 
     private:
@@ -67,4 +81,11 @@
 
         void checkFadeStepValidity();
+        void checkVolumeValidity();
+        void checkAmbientVolumeValidity();
+        void checkEffectsVolumeValidity();
+        
+        void updateAmbientVolume(void);
+        void updateEffectsVolume(void);
+        void updateVolume(void);
 
         ALCdevice* device_;
@@ -78,7 +99,11 @@
         std::list<AmbientSound*> fadeOutList_;
         
+        float ambientVolume_;
+        float effectsVolume_;
+        float volume_;
+        
         static SoundManager* singletonPtr_s;
-    };
-}
+    }; // tolua_export
+} // tolua_export
 
 #endif /* _SoundManager_H__ */
