Index: code/branches/audio/CMakeLists.txt
===================================================================
--- code/branches/audio/CMakeLists.txt	(revision 376)
+++ code/branches/audio/CMakeLists.txt	(revision 377)
@@ -50,10 +50,10 @@
 FIND_PACKAGE(Boost)
 FIND_PACKAGE(OpenAL)
-FIND_PACKAGE(ALUT)	# Only for testing on my machine
+FIND_PACKAGE(ALUT)
 
 #Sets the search paths for the linking
-LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${OPENAL_LIB_DIR} ${ALUT_LIB_DIR} ${Boost_LIBRARY_DIRS} ${OPENAL_LIBRARY} core objects loader network weapon classHierarchy audio openal alut)
+LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${Boost_LIBRARY_DIRS} ${OPENAL_LIBRARY} ${ALUT_LIBRARY} core objects loader network weapon classHierarchy audio)
 #Sets the search path for include files
-INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} ${ENet_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENAL_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} ${ENet_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR})
 
 #add main source dir
Index: code/branches/audio/cmake/FindOpenAL.cmake
===================================================================
--- code/branches/audio/cmake/FindOpenAL.cmake	(revision 376)
+++ code/branches/audio/cmake/FindOpenAL.cmake	(revision 377)
@@ -9,4 +9,5 @@
 # used in building OpenAL.
 #
+
 # Created by Eric Wing. This was influenced by the FindSDL.cmake module.
 # On OSX, this will prefer the Framework version (if found) over others.
@@ -16,26 +17,26 @@
 # But for now, we have to look around.
 # Other (Unix) systems should be able to utilize the non-framework paths.
-FIND_PATH(OPENAL_INCLUDE_DIR al.h
+FIND_PATH(OPENAL_INCLUDE_DIR AL/al.h
   $ENV{OPENALDIR}/include
   ~/Library/Frameworks/OpenAL.framework/Headers
   /Library/Frameworks/OpenAL.framework/Headers
   /System/Library/Frameworks/OpenAL.framework/Headers # Tiger
-  /usr/pack/openal-0.0.8-cl/include/AL # Tardis specific hack
-  /usr/local/include/AL
+  /usr/pack/openal-0.0.8-cl/include # Tardis specific hack
+  /usr/local/include/
   /usr/local/include/OpenAL
   /usr/local/include
-  /usr/include/AL
+  /usr/include/
   /usr/include/OpenAL
   /usr/include
-  /sw/include/AL # Fink
+  /sw/include # Fink
   /sw/include/OpenAL
   /sw/include
-  /opt/local/include/AL # DarwinPorts
+  /opt/local/include # DarwinPorts
   /opt/local/include/OpenAL
   /opt/local/include
-  /opt/csw/include/AL # Blastwave
+  /opt/csw/include # Blastwave
   /opt/csw/include/OpenAL
   /opt/csw/include
-  /opt/include/AL
+  /opt/include
   /opt/include/OpenAL
   /opt/include
@@ -69,4 +70,5 @@
     $ENV{OPENALDIR}/lib
     $ENV{OPENALDIR}/libs
+		/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1/lib
     /usr/local/lib
     /usr/lib
@@ -81,4 +83,5 @@
 IF(OPENAL_LIBRARY)
   SET(OPENAL_FOUND "YES")
+	MESSAGE(STATUS "OpenAL was found. Libdir ${OPENAL_LIBRARY} Includedir ${OPENAL_INCLUDE_DIR}")
 ENDIF(OPENAL_LIBRARY)
 
Index: code/branches/audio/cmakeclearcache
===================================================================
--- code/branches/audio/cmakeclearcache	(revision 377)
+++ code/branches/audio/cmakeclearcache	(revision 377)
@@ -0,0 +1,9 @@
+#!/bin/bash
+# Clears the cmake cache
+# Author: Nicolas Perrenoud <nicolape@ee.ethz.ch>
+
+find . -iname "cmakecache*" -exec rm -f {} \;
+find . -iname "cmake_ins*" -exec rm -f {} \;
+find . -iname "cmakefiles*" -exec rm -fr {} \;
+
+echo "Cmake Cache cleared!"
Index: code/branches/audio/src/audio/Ambient.cc
===================================================================
--- code/branches/audio/src/audio/Ambient.cc	(revision 376)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <iostream>
-#include <string>
-#include "Ambient.h"
-
-namespace audio
-{
-	Ambient::Ambient(std::string audioFile)
-	{
-		a = new AudioObject(audioFile);
-	}
-	
-	Ambient::~Ambient()
-	{	
-		
-	}
-	
-	void Ambient::play()
-	{
-		a->play();	
-	}
-}
-
Index: code/branches/audio/src/audio/Ambient.h
===================================================================
--- code/branches/audio/src/audio/Ambient.h	(revision 376)
+++ 	(revision )
@@ -1,24 +1,0 @@
-#ifndef __CLASS_AMBIENT_H__
-#define __CLASS_AMBIENT_H__
-
-#include <iostream>
-#include "../../include/AL/al.h"
-#include "../../include/AL/alc.h"
-#include "../../include/AL/alut.h"
-
-#include "AudioObject.h"
-
-namespace audio
-{
-	class Ambient
-	{
-	public:
-		Ambient(std::string audioFile);
-		~Ambient();
-		void play();
-	private:
-		AudioObject* a;
-	};
-}
-
-#endif
Index: code/branches/audio/src/audio/AudioBuffer.h
===================================================================
--- code/branches/audio/src/audio/AudioBuffer.h	(revision 376)
+++ code/branches/audio/src/audio/AudioBuffer.h	(revision 377)
@@ -6,7 +6,7 @@
 #include <vector>
 
-#include "../../include/AL/al.h"
-#include "../../include/AL/alc.h"
-#include "../../include/AL/alut.h"
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <AL/alut.h>
 
 namespace audio
Index: code/branches/audio/src/audio/AudioManager.h
===================================================================
--- code/branches/audio/src/audio/AudioManager.h	(revision 376)
+++ code/branches/audio/src/audio/AudioManager.h	(revision 377)
@@ -6,7 +6,7 @@
 #include <vector>
 
-#include "../../include/AL/al.h"
-#include "../../include/AL/alc.h"
-#include "../../include/AL/alut.h"
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <AL/alut.h>
 
 #include "AudioBuffer.h"
@@ -30,5 +30,9 @@
 		// upwards the listener)
 		void setOri(std::vector<float> at, std::vector<float> up);
+		// Parses given xml string
+		void loadParams();
 	private:
+
+	
 		// Vector containing all audio files
 		std::vector<AudioBuffer> buffers;
Index: code/branches/audio/src/audio/AudioObject.cc
===================================================================
--- code/branches/audio/src/audio/AudioObject.cc	(revision 376)
+++ 	(revision )
@@ -1,113 +1,0 @@
-#include <iostream>
-#include <string>
-#include "AudioObject.h"
-
-namespace audio
-{
-	AudioObject::AudioObject(std::string audioFile)
-	{
-		audioFile_ = audioFile;
-		SourcePos[0]=0;
-		SourcePos[1]=0;
-		SourcePos[2]=0;
-
-		 SourceVel[0]=0;
-		 SourceVel[1]=0;
-		 SourceVel[2]=0;
-
-		 ListenerPos[0]=0;
-		 ListenerPos[1]=0;
-		 ListenerPos[2]=0;
-
-		 ListenerVel[0]=0;
-		 ListenerVel[1]=0;
-		 ListenerVel[2]=0;
-
-		 ListenerOri[0]=0;
-		 ListenerOri[1]=0;
-		 ListenerOri[2]=-1;
-		 ListenerOri[3]=0;
-		 ListenerOri[4]=1;
-		 ListenerOri[5]=0;
-
-
-		// Initialize OpenAL and clear the error bit.
-	
-		alutInit(NULL, 0);
-		alGetError();
-	
-		// Load the wav data.
-	
-		if(LoadALData() == AL_FALSE)
-		{
-		    printf("Error loading sound data.");
-			
-		}
-
-		SetListenerValues();
-		std::cout << "Play sone ambient background sound";
-	}
-	
-	AudioObject::~AudioObject()
-	{	
-		KillALData();
-	}
-	
-	ALboolean AudioObject::LoadALData()
-	{
-		ALenum format;
-		ALsizei size;
-		ALvoid* data;
-		ALsizei freq;
-		ALboolean loop;
-	
-	
-		alGenBuffers(1, &Buffer);
-	
-		if(alGetError() != AL_NO_ERROR)
-			return AL_FALSE;
-	
-		alutLoadWAVFile((ALbyte*)audioFile_.c_str(), &format, &data, &size, &freq, &loop);
-		alBufferData(Buffer, format, data, size, freq);
-		alutUnloadWAV(format, data, size, freq);
-	
-		alGenSources(1, &Source);
-	
-		if(alGetError() != AL_NO_ERROR)
-			return AL_FALSE;
-	
-		alSourcei (Source, AL_BUFFER,   Buffer   );
-		alSourcef (Source, AL_PITCH,    1.0      );
-		alSourcef (Source, AL_GAIN,     1.0      );
-		alSourcefv(Source, AL_POSITION, SourcePos);
-		alSourcefv(Source, AL_VELOCITY, SourceVel);
-		alSourcei (Source, AL_LOOPING,  loop     );
-	
-		if(alGetError() == AL_NO_ERROR)
-			return AL_TRUE;
-	
-	
-		return AL_FALSE;
-	}	
-
-	void AudioObject::SetListenerValues()
-	{
-		alListenerfv(AL_POSITION,    ListenerPos);
-		alListenerfv(AL_VELOCITY,    ListenerVel);
-		alListenerfv(AL_ORIENTATION, ListenerOri);
-	}
-	
-	void AudioObject::KillALData()
-	{
-		alDeleteBuffers(1, &Buffer);
-		alDeleteSources(1, &Source);
-		alutExit();
-	}
-
-	void AudioObject::play()
-	{
-		alSourcePlay(Source);
-	
-	}
-}
-
Index: code/branches/audio/src/audio/AudioObject.h
===================================================================
--- code/branches/audio/src/audio/AudioObject.h	(revision 376)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#ifndef AUDIOOBJECT_H_
-#define AUDIOOBJECT_H_
-
-#include <iostream>
-#include "../../include/AL/al.h"
-#include "../../include/AL/alc.h"
-#include "../../include/AL/alut.h"
-
-namespace audio
-{
-	class AudioObject
-	{
-	public:
-		AudioObject(std::string audioFile);
-		~AudioObject();
-
-		void play();
-		void pause();
-		void stop();
-
-	private:
-		ALboolean LoadALData();	
-		void SetListenerValues();
-		void KillALData();
-		
-		std::string audioFile_;
-		
-		ALuint Buffer;
-		ALuint Source;
-		ALfloat SourcePos[3];
-		ALfloat SourceVel[3];
-		ALfloat ListenerPos[3];
-		ALfloat ListenerVel[3];
-		ALfloat ListenerOri[6];
-	};
-	
-	
-	
-	
-	
-}
-
-#endif /*AUDIOOBJECT_H_*/
Index: code/branches/audio/src/audio/AudioSource.h
===================================================================
--- code/branches/audio/src/audio/AudioSource.h	(revision 376)
+++ code/branches/audio/src/audio/AudioSource.h	(revision 377)
@@ -6,7 +6,7 @@
 #include <vector>
 
-#include "../../include/AL/al.h"
-#include "../../include/AL/alc.h"
-#include "../../include/AL/alut.h"
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <AL/alut.h>
 
 namespace audio
Index: code/branches/audio/src/audio/_Ambient.cc
===================================================================
--- code/branches/audio/src/audio/_Ambient.cc	(revision 377)
+++ code/branches/audio/src/audio/_Ambient.cc	(revision 377)
@@ -0,0 +1,22 @@
+#include <iostream>
+#include <string>
+#include "Ambient.h"
+
+namespace audio
+{
+	Ambient::Ambient(std::string audioFile)
+	{
+		a = new AudioObject(audioFile);
+	}
+	
+	Ambient::~Ambient()
+	{	
+		
+	}
+	
+	void Ambient::play()
+	{
+		a->play();	
+	}
+}
+
Index: code/branches/audio/src/audio/_Ambient.h
===================================================================
--- code/branches/audio/src/audio/_Ambient.h	(revision 377)
+++ code/branches/audio/src/audio/_Ambient.h	(revision 377)
@@ -0,0 +1,24 @@
+#ifndef __CLASS_AMBIENT_H__
+#define __CLASS_AMBIENT_H__
+
+#include <iostream>
+#include "../../include/AL/al.h"
+#include "../../include/AL/alc.h"
+#include "../../include/AL/alut.h"
+
+#include "AudioObject.h"
+
+namespace audio
+{
+	class Ambient
+	{
+	public:
+		Ambient(std::string audioFile);
+		~Ambient();
+		void play();
+	private:
+		AudioObject* a;
+	};
+}
+
+#endif
Index: code/branches/audio/src/audio/_AudioObject.cc
===================================================================
--- code/branches/audio/src/audio/_AudioObject.cc	(revision 377)
+++ code/branches/audio/src/audio/_AudioObject.cc	(revision 377)
@@ -0,0 +1,113 @@
+#include <iostream>
+#include <string>
+#include "AudioObject.h"
+
+namespace audio
+{
+	AudioObject::AudioObject(std::string audioFile)
+	{
+		audioFile_ = audioFile;
+		SourcePos[0]=0;
+		SourcePos[1]=0;
+		SourcePos[2]=0;
+
+		 SourceVel[0]=0;
+		 SourceVel[1]=0;
+		 SourceVel[2]=0;
+
+		 ListenerPos[0]=0;
+		 ListenerPos[1]=0;
+		 ListenerPos[2]=0;
+
+		 ListenerVel[0]=0;
+		 ListenerVel[1]=0;
+		 ListenerVel[2]=0;
+
+		 ListenerOri[0]=0;
+		 ListenerOri[1]=0;
+		 ListenerOri[2]=-1;
+		 ListenerOri[3]=0;
+		 ListenerOri[4]=1;
+		 ListenerOri[5]=0;
+
+
+		// Initialize OpenAL and clear the error bit.
+	
+		alutInit(NULL, 0);
+		alGetError();
+	
+		// Load the wav data.
+	
+		if(LoadALData() == AL_FALSE)
+		{
+		    printf("Error loading sound data.");
+			
+		}
+
+		SetListenerValues();
+		std::cout << "Play sone ambient background sound";
+	}
+	
+	AudioObject::~AudioObject()
+	{	
+		KillALData();
+	}
+	
+	ALboolean AudioObject::LoadALData()
+	{
+		ALenum format;
+		ALsizei size;
+		ALvoid* data;
+		ALsizei freq;
+		ALboolean loop;
+	
+	
+		alGenBuffers(1, &Buffer);
+	
+		if(alGetError() != AL_NO_ERROR)
+			return AL_FALSE;
+	
+		alutLoadWAVFile((ALbyte*)audioFile_.c_str(), &format, &data, &size, &freq, &loop);
+		alBufferData(Buffer, format, data, size, freq);
+		alutUnloadWAV(format, data, size, freq);
+	
+		alGenSources(1, &Source);
+	
+		if(alGetError() != AL_NO_ERROR)
+			return AL_FALSE;
+	
+		alSourcei (Source, AL_BUFFER,   Buffer   );
+		alSourcef (Source, AL_PITCH,    1.0      );
+		alSourcef (Source, AL_GAIN,     1.0      );
+		alSourcefv(Source, AL_POSITION, SourcePos);
+		alSourcefv(Source, AL_VELOCITY, SourceVel);
+		alSourcei (Source, AL_LOOPING,  loop     );
+	
+		if(alGetError() == AL_NO_ERROR)
+			return AL_TRUE;
+	
+	
+		return AL_FALSE;
+	}	
+
+	void AudioObject::SetListenerValues()
+	{
+		alListenerfv(AL_POSITION,    ListenerPos);
+		alListenerfv(AL_VELOCITY,    ListenerVel);
+		alListenerfv(AL_ORIENTATION, ListenerOri);
+	}
+	
+	void AudioObject::KillALData()
+	{
+		alDeleteBuffers(1, &Buffer);
+		alDeleteSources(1, &Source);
+		alutExit();
+	}
+
+	void AudioObject::play()
+	{
+		alSourcePlay(Source);
+	
+	}
+}
+
Index: code/branches/audio/src/audio/_AudioObject.h
===================================================================
--- code/branches/audio/src/audio/_AudioObject.h	(revision 377)
+++ code/branches/audio/src/audio/_AudioObject.h	(revision 377)
@@ -0,0 +1,38 @@
+#ifndef AUDIOOBJECT_H_
+#define AUDIOOBJECT_H_
+
+#include <iostream>
+#include "../../include/AL/al.h"
+#include "../../include/AL/alc.h"
+#include "../../include/AL/alut.h"
+
+namespace audio
+{
+	class AudioObject
+	{
+	public:
+		AudioObject(std::string audioFile);
+		~AudioObject();
+
+		void play();
+		void pause();
+		void stop();
+
+	private:
+		ALboolean LoadALData();	
+		void SetListenerValues();
+		void KillALData();
+		
+		std::string audioFile_;
+		
+		ALuint Buffer;
+		ALuint Source;
+		ALfloat SourcePos[3];
+		ALfloat SourceVel[3];
+		ALfloat ListenerPos[3];
+		ALfloat ListenerVel[3];
+		ALfloat ListenerOri[6];
+	};	
+}
+
+#endif /*AUDIOOBJECT_H_*/
Index: code/branches/audio/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/audio/src/orxonox/CMakeLists.txt	(revision 376)
+++ code/branches/audio/src/orxonox/CMakeLists.txt	(revision 377)
@@ -6,5 +6,5 @@
 ADD_EXECUTABLE(../../bin/main ${SRC_FILES} ${INC_FILES})
 
-TARGET_LINK_LIBRARIES(../../bin/main ${OGRE_LIBRARIES} ${OIS_LIBRARIES} ${OPENAL_LIBRARIES} loader audio)
+TARGET_LINK_LIBRARIES(../../bin/main ${OGRE_LIBRARIES} ${OIS_LIBRARIES} loader audio)
 
 INCLUDE_DIRECTORIES(..)
