Index: code/branches/audio/CMakeLists.txt
===================================================================
--- code/branches/audio/CMakeLists.txt	(revision 333)
+++ code/branches/audio/CMakeLists.txt	(revision 334)
@@ -49,8 +49,8 @@
 FIND_PACKAGE(ENet)
 FIND_PACKAGE(Boost)
-#FIND_PACKAGE(OpenAL)
+FIND_PACKAGE(OpenAL)
 
 #Sets the search paths for the linking
-LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${Boost_LIBRARY_DIRS} core objects loader network weapon classHierarchy audio)
+LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${OPENAL_LIB_DIR} ${Boost_LIBRARY_DIRS} core objects loader network weapon classHierarchy audio openal alut)
 #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})
Index: code/branches/audio/include/AL/CMakeLists.txt
===================================================================
--- code/branches/audio/include/AL/CMakeLists.txt	(revision 333)
+++ 	(revision )
@@ -1,7 +1,0 @@
-PROJECT(Orxonox)
-
-SET(INC_FILES al.h alc.h alext.h alut.h)
-
-
-
-
Index: code/branches/audio/src/audio/Ambient.cc
===================================================================
--- code/branches/audio/src/audio/Ambient.cc	(revision 333)
+++ code/branches/audio/src/audio/Ambient.cc	(revision 334)
@@ -32,4 +32,24 @@
 		 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();
+
+	// Setup an exit procedure.
+
+	//atexit(KillALData);
+
 		std::cout << "Play sone ambient background sound";
 	}
@@ -42,4 +62,5 @@
 	ALsizei freq;
 	ALboolean loop;
+
 
 	alGenBuffers(1, &Buffer);
@@ -67,6 +88,29 @@
 		return AL_TRUE;
 
+
 	return AL_FALSE;
 }	
+
+void Ambient::SetListenerValues()
+{
+	alListenerfv(AL_POSITION,    ListenerPos);
+	alListenerfv(AL_VELOCITY,    ListenerVel);
+	alListenerfv(AL_ORIENTATION, ListenerOri);
+}
+
+void Ambient::KillALData()
+{
+	alDeleteBuffers(1, &Buffer);
+	alDeleteSources(1, &Source);
+	alutExit();
+}
+
+void Ambient::play()
+{
+	alSourcePlay(Source);
+
+}
+
+
 	
 	
Index: code/branches/audio/src/audio/Ambient.h
===================================================================
--- code/branches/audio/src/audio/Ambient.h	(revision 333)
+++ code/branches/audio/src/audio/Ambient.h	(revision 334)
@@ -14,7 +14,9 @@
 	public:
 		Ambient();
+		void play();
 	private:
 		ALboolean LoadALData();	
-
+		void SetListenerValues();
+		void KillALData();
 
 		ALuint Buffer;
Index: code/branches/audio/src/audio/CMakeLists.txt
===================================================================
--- code/branches/audio/src/audio/CMakeLists.txt	(revision 333)
+++ code/branches/audio/src/audio/CMakeLists.txt	(revision 334)
@@ -4,7 +4,9 @@
 SET(INC_FILES Ambient.h)
 
-INCLUDE_DIRECTORIES(..)
 
 ADD_LIBRARY(audio ${SRC_FILES} ${INC_FILES})
 
-TARGET_LINK_LIBRARIES(../openal/lib)
+TARGET_LINK_LIBRARIES(audio alut)
+TARGET_LINK_LIBRARIES(audio openal)
+
+
Index: code/branches/audio/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/audio/src/orxonox/CMakeLists.txt	(revision 333)
+++ code/branches/audio/src/orxonox/CMakeLists.txt	(revision 334)
@@ -6,5 +6,5 @@
 ADD_EXECUTABLE(../../bin/main ${SRC_FILES} ${INC_FILES})
 
-TARGET_LINK_LIBRARIES(../../bin/main ${OGRE_LIBRARIES} ${OIS_LIBRARIES} loader audio)
+TARGET_LINK_LIBRARIES(../../bin/main ${OGRE_LIBRARIES} ${OIS_LIBRARIES} ${OPENAL_LIBRARIES} loader audio)
 
 INCLUDE_DIRECTORIES(..)
Index: code/branches/audio/src/orxonox/orxonox.cc
===================================================================
--- code/branches/audio/src/orxonox/orxonox.cc	(revision 333)
+++ code/branches/audio/src/orxonox/orxonox.cc	(revision 334)
@@ -192,4 +192,5 @@
       {
 				audio::Ambient* bgsound = new audio::Ambient();
+				bgsound->play();
 				        
         string levelFile = "sp_level_moonstation.oxw";
