Index: /code/branches/audio/CMakeLists.txt
===================================================================
--- /code/branches/audio/CMakeLists.txt	(revision 326)
+++ /code/branches/audio/CMakeLists.txt	(revision 327)
@@ -51,5 +51,5 @@
 
 #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)
+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)
 #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/src/audio/Ambient.cc
===================================================================
--- /code/branches/audio/src/audio/Ambient.cc	(revision 327)
+++ /code/branches/audio/src/audio/Ambient.cc	(revision 327)
@@ -0,0 +1,71 @@
+#include <iostream>
+#include "Ambient.h"
+
+namespace audio
+{
+	Ambient::Ambient()
+	{
+		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;
+
+		std::cout << "Play sone ambient background sound";
+	}
+	
+ALboolean Ambient::LoadALData()
+{
+	ALenum format;
+	ALsizei size;
+	ALvoid* data;
+	ALsizei freq;
+	ALboolean loop;
+
+	alGenBuffers(1, &Buffer);
+
+	if(alGetError() != AL_NO_ERROR)
+		return AL_FALSE;
+
+	alutLoadWAVFile((ALbyte*)"wavdata/pirate.wav", &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;
+}	
+	
+	
+}
+
Index: /code/branches/audio/src/audio/Ambient.h
===================================================================
--- /code/branches/audio/src/audio/Ambient.h	(revision 327)
+++ /code/branches/audio/src/audio/Ambient.h	(revision 327)
@@ -0,0 +1,35 @@
+#ifndef __CLASS_AMBIENT_H__
+#define __CLASS_AMBIENT_H__
+
+#include <iostream>
+#include "../openal/al.h"
+#include "../openal/alc.h"
+#include "../openal/alut.h"
+
+
+namespace audio
+{
+	class Ambient
+	{
+	public:
+		Ambient();
+	private:
+		ALboolean LoadALData();	
+
+
+		ALuint Buffer;
+		ALuint Source;
+		ALfloat SourcePos[3];
+		ALfloat SourceVel[3];
+		ALfloat ListenerPos[3];
+		ALfloat ListenerVel[3];
+		ALfloat ListenerOri[6];
+	};
+	
+	
+	
+	
+	
+}
+
+#endif
Index: /code/branches/audio/src/audio/CMakeLists.txt
===================================================================
--- /code/branches/audio/src/audio/CMakeLists.txt	(revision 327)
+++ /code/branches/audio/src/audio/CMakeLists.txt	(revision 327)
@@ -0,0 +1,10 @@
+PROJECT(Orxonox)
+
+SET(SRC_FILES Ambient.cc)
+SET(INC_FILES Ambient.h)
+
+INCLUDE_DIRECTORIES(..)
+
+ADD_LIBRARY(audio ${SRC_FILES} ${INC_FILES})
+
+TARGET_LINK_LIBRARIES(../openal/lib)
Index: /code/branches/audio/src/openal/CMakeLists.txt
===================================================================
--- /code/branches/audio/src/openal/CMakeLists.txt	(revision 326)
+++ /code/branches/audio/src/openal/CMakeLists.txt	(revision 327)
@@ -3,5 +3,5 @@
 SET(INC_FILES al.h alc.h alext.h alut.h)
 
-TARGET_LINK_LIBRARIES(lib)
 
 
+
Index: /code/branches/audio/src/openal/alext.h
===================================================================
--- /code/branches/audio/src/openal/alext.h	(revision 326)
+++ /code/branches/audio/src/openal/alext.h	(revision 327)
@@ -2,6 +2,6 @@
 #define _AL_ALEXT_H
 
-#include <AL/al.h>
-#include <AL/alc.h>
+#include "AL/al.h"
+#include "AL/alc.h"
 
 #ifdef __cplusplus
Index: /code/branches/audio/src/openal/alut.h
===================================================================
--- /code/branches/audio/src/openal/alut.h	(revision 326)
+++ /code/branches/audio/src/openal/alut.h	(revision 327)
@@ -9,6 +9,6 @@
 #include <OpenAL/al.h>
 #else
-#include <AL/al.h>
-#include <AL/alc.h>
+#include "al.h"
+#include "alc.h"
 #endif
 
Index: /code/branches/audio/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/audio/src/orxonox/CMakeLists.txt	(revision 326)
+++ /code/branches/audio/src/orxonox/CMakeLists.txt	(revision 327)
@@ -6,5 +6,5 @@
 ADD_EXECUTABLE(../../bin/main ${SRC_FILES} ${INC_FILES})
 
-TARGET_LINK_LIBRARIES(../../bin/main ${OGRE_LIBRARIES} ${OIS_LIBRARIES} loader )
+TARGET_LINK_LIBRARIES(../../bin/main ${OGRE_LIBRARIES} ${OIS_LIBRARIES} loader audio)
 
 INCLUDE_DIRECTORIES(..)
Index: /code/branches/audio/src/orxonox/orxonox.cc
===================================================================
--- /code/branches/audio/src/orxonox/orxonox.cc	(revision 326)
+++ /code/branches/audio/src/orxonox/orxonox.cc	(revision 327)
@@ -41,4 +41,5 @@
 #include "xml/xmlParser.h"
 #include "loader/LevelLoader.h"
+#include "audio/Ambient.h"
 
 
@@ -190,7 +191,11 @@
       void createScene(void)
       {
-
+				audio::Ambient* bgsound = new audio::Ambient();
+				        
         string levelFile = "sp_level_moonstation.oxw";
         loader::LevelLoader* loader = new loader::LevelLoader(levelFile);
+        
+        
+        
       }
 
