Index: code/branches/FICN/src/audio/AudioManager.cc
===================================================================
--- code/branches/FICN/src/audio/AudioManager.cc	(revision 424)
+++ code/branches/FICN/src/audio/AudioManager.cc	(revision 430)
@@ -1,3 +1,5 @@
 #include "AudioManager.h"
+
+
 
 namespace audio
@@ -5,37 +7,91 @@
 	AudioManager::AudioManager()
 	{
+		ambientPath = "audio/ambient";
+
  		alutInit(NULL, 0);
-
-		bgSound.open("ambient1");
+		
+	    
 
 
 
-		bgSound.display();
-
-		if(!bgSound.playback())
-		{
-    	orxonox::Error("Ogg refused to play.");
-		}
 	}
 		
 	AudioManager::~AudioManager()
 	{
-		bgSound.release();
+		for (unsigned int i=0;i<=bgSounds.size();i++)
+		{
+			bgSounds[i].release();	
+		}
 		alutExit();
+	}
+
+	void AudioManager::ambientStart()
+	{
+		currentBgSound = 0;
+		if (bgSounds.size() > 0)
+		{
+			if(!bgSounds[currentBgSound].playback())
+			{
+    		orxonox::Error("Ogg refused to play.");
+			}
+			else
+			{
+				std::cout << "Started playing background sound"<<std::endl;
+			}
+		}
+
+	}
+
+	void AudioManager::ambientStop()
+	{
+		std::cout << "Stopped playing background sound"<<std::endl;
+	}	
+
+	void AudioManager::ambientAdd(std::string file)
+	{
+    std::string path = ambientPath + "/" + file + ".ogg"; 
+		AudioStream tmp(path);
+		tmp.open();
+		if (tmp.isLoaded())
+		{
+			bgSounds.push_back(tmp);	
+			std::cout << "Added background sound "<<file<<std::endl;
+		}
 	}
 	
 	void AudioManager::update()
 	{
-		
-		if (bgSound.isLoaded())
+		if (bgSounds.size() > 0)
 		{
-			bgSound.update();
-	    if(!bgSound.playing())
-	    {
-	        if(!bgSound.playback())
-	            orxonox::Error("Ogg abruptly stopped.");
-	        else
-	            orxonox::Error("Ogg stream was interrupted.");
-	    }
+			if (bgSounds[currentBgSound].isLoaded())
+			{
+				bool playing = bgSounds[currentBgSound].update();
+		    if(!bgSounds[currentBgSound].playing() && playing)
+		    {
+		        if(!bgSounds[currentBgSound].playback())
+		            orxonox::Error("Ogg abruptly stopped.");
+		        else
+		            orxonox::Error("Ogg stream was interrupted.");
+
+		    }
+				if (!playing)
+				{
+					if (currentBgSound < bgSounds.size()-1)
+					{
+						currentBgSound++;
+					}
+					else
+					{
+						currentBgSound=0;
+					}
+					if (!bgSounds[currentBgSound].isLoaded())
+					{
+						bgSounds[currentBgSound].release();
+						bgSounds[currentBgSound].open();
+					}
+					bgSounds[currentBgSound].playback();
+					std::cout << "Playing next background sound "<<std::endl;
+				}
+			}
 		}
 	}
Index: code/branches/FICN/src/audio/AudioManager.h
===================================================================
--- code/branches/FICN/src/audio/AudioManager.h	(revision 424)
+++ code/branches/FICN/src/audio/AudioManager.h	(revision 430)
@@ -37,8 +37,17 @@
 		void update();
 
+		void ambientAdd(std::string file);
+		void ambientStart();
+		void ambientStop();
+
 	private:
 
-		// Backgroundsound
-    AudioStream bgSound;
+		// Background sound
+    std::vector<AudioStream> bgSounds;
+		int currentBgSound;
+
+
+
+		std::string ambientPath;
 	
 		// Vector containing all audio files
Index: code/branches/FICN/src/audio/AudioStream.cc
===================================================================
--- code/branches/FICN/src/audio/AudioStream.cc	(revision 424)
+++ code/branches/FICN/src/audio/AudioStream.cc	(revision 430)
@@ -4,11 +4,14 @@
 namespace audio
 {
-	void AudioStream::open(std::string path)
+	AudioStream::AudioStream(std::string path)
+	{
+		this->path = path;
+		loaded = false;
+	}	
+
+	void AudioStream::open()
 	{
 	    int result;
-			loaded = false;
-	    
-
-	    path = "audio/ambient/" + path + ".ogg"; 
+
 	    
 	    if(!(oggFile = fopen(path.c_str(), "rb")))
@@ -53,6 +56,5 @@
 	void AudioStream::release()
 	{
-		if (loaded)
-		{
+
 	    alSourceStop(source);
 	    empty();
@@ -64,5 +66,5 @@
 	    ov_clear(&oggStream);
 			loaded = false;
-		}
+		
 	}
 	
@@ -155,4 +157,8 @@
 	    }
 	
+			if (active==false)
+			{
+				loaded = false;
+			}
 	    return active;
 	}
Index: code/branches/FICN/src/audio/AudioStream.h
===================================================================
--- code/branches/FICN/src/audio/AudioStream.h	(revision 424)
+++ code/branches/FICN/src/audio/AudioStream.h	(revision 430)
@@ -7,11 +7,10 @@
 {
 	#define BUFFER_SIZE (4096 * 4)
-	#define STREAM_FILES_DIR "audio/ambient"
 	
 	class AudioStream
 	{
 	    public:
-	
-	        void open(std::string path);
+					AudioStream(std::string path);
+	        void open();
 	        void release();
 	        void display();
@@ -30,4 +29,6 @@
 	    private:
 	
+					std::string path;
+
 	        FILE*           oggFile;
 	        OggVorbis_File  oggStream;
