Index: /orxonox/branches/openAL/src/Makefile.am
===================================================================
--- /orxonox/branches/openAL/src/Makefile.am	(revision 4195)
+++ /orxonox/branches/openAL/src/Makefile.am	(revision 4196)
@@ -131,4 +131,5 @@
 		 defs/stdincl.h \
 		 defs/glincl.h \
+		 defs/alincl.h \
 		 defs/comincl.h \
 		 defs/confincl.h \
Index: /orxonox/branches/openAL/src/Makefile.in
===================================================================
--- /orxonox/branches/openAL/src/Makefile.in	(revision 4195)
+++ /orxonox/branches/openAL/src/Makefile.in	(revision 4196)
@@ -375,4 +375,5 @@
 		 defs/stdincl.h \
 		 defs/glincl.h \
+		 defs/alincl.h \
 		 defs/comincl.h \
 		 defs/confincl.h \
Index: /orxonox/branches/openAL/src/defs/alincl.h
===================================================================
--- /orxonox/branches/openAL/src/defs/alincl.h	(revision 4196)
+++ /orxonox/branches/openAL/src/defs/alincl.h	(revision 4196)
@@ -0,0 +1,21 @@
+/*!
+  \file alincl.h
+  \brief This file includes al Headers.
+  
+  no Class is defined here, but the openAL Headers
+*/
+
+#ifndef _ALINCL_H
+#define _ALINCL_H
+
+#ifndef __APPLE__
+#include <AL/al.h>
+#include <AL/alu.h>
+#include <AL/alut.h>
+#else
+#include <OpenAL/al.h>
+#include <OpenAL/alu.h>
+#include <OpenAL/alut.h>
+#endif
+
+#endif /* _ALINCL_H */
Index: /orxonox/branches/openAL/src/lib/coord/p_node.h
===================================================================
--- /orxonox/branches/openAL/src/lib/coord/p_node.h	(revision 4195)
+++ /orxonox/branches/openAL/src/lib/coord/p_node.h	(revision 4196)
@@ -66,4 +66,5 @@
   void setRelDir (const Quaternion& relDir);
   inline const Quaternion& getAbsDir () const { return this->absDirection; }
+  inline Vector getAbsDirV(void) const { return this->absDirection.apply(Vector(0,1,0)); }
   void setAbsDir (const Quaternion& absDir);
   void shiftDir (const Quaternion& shift);
Index: /orxonox/branches/openAL/src/lib/math/vector.cc
===================================================================
--- /orxonox/branches/openAL/src/lib/math/vector.cc	(revision 4195)
+++ /orxonox/branches/openAL/src/lib/math/vector.cc	(revision 4196)
@@ -329,5 +329,5 @@
 */
 
-Vector Quaternion::apply (Vector& v) const
+Vector Quaternion::apply (const Vector& v) const
 {
   Quaternion q;
Index: /orxonox/branches/openAL/src/lib/math/vector.h
===================================================================
--- /orxonox/branches/openAL/src/lib/math/vector.h	(revision 4195)
+++ /orxonox/branches/openAL/src/lib/math/vector.h	(revision 4196)
@@ -96,5 +96,5 @@
   return r;}
   Quaternion inverse () const;
-  Vector apply (Vector& f) const;
+  Vector apply (const Vector& f) const;
   float norm () const;
   void matrix (float m[4][4]) const;
Index: /orxonox/branches/openAL/src/lib/sound/sound_engine.cc
===================================================================
--- /orxonox/branches/openAL/src/lib/sound/sound_engine.cc	(revision 4195)
+++ /orxonox/branches/openAL/src/lib/sound/sound_engine.cc	(revision 4196)
@@ -17,7 +17,50 @@
 
 #include "sound_engine.h"
+#include "p_node.h"
+#include "list.h"
 
 using namespace std;
 
+
+/**
+   \brief Creates a Soundbuffer out of an inputfile
+   \param fileName The name of the File
+*/
+SoundBuffer::SoundBuffer(const char* fileName)
+{
+  SoundEngine::getInstance()->addBuffer(this);
+
+  ALenum format;
+  ALvoid* data;
+  ALsizei freq;
+
+  alGenBuffers(1, &this->bufferID);
+  alutLoadWAVFile((ALbyte*)fileName, &format, &data, &this->size, &freq, &this->loop);
+  alBufferData(this->bufferID, format, data, this->size, freq);
+  alutUnloadWAV(format, data, this->size, freq);
+}
+
+SoundBuffer::~SoundBuffer(void)
+{
+  SoundEngine::getInstance()->removeBuffer(this);
+}
+
+
+
+/**
+   \brief creates a SoundSource at position sourceNode with the SoundBuffer buffer
+*/
+SoundSource::SoundSource(SoundBuffer* buffer, PNode* sourceNode)
+{
+  SoundEngine::getInstance()->addSource(this);
+
+  this->buffer = buffer;
+  this->sourceNode = sourceNode;
+}
+
+SoundSource::~SoundSource(void)
+{
+  SoundEngine::getInstance()->removeSource(this);
+}
 
 /**
@@ -26,6 +69,11 @@
 SoundEngine::SoundEngine () 
 {
-   this->setClassName ("SoundEngine");
+  this->setClassName ("SoundEngine");
+   
+   this->initAudio();
 
+   this->listener = NULL;
+   this->bufferList = new tList<SoundBuffer>;
+   this->sourceList = new tList<SoundSource>;
 }
 
@@ -54,2 +102,83 @@
 
 }
+
+/**
+   \brief sets The listener (normaly the Camera)
+*/
+void SoundEngine::setListener(PNode* listener)
+{
+  this->listener = listener;
+}
+
+
+void SoundEngine::addBuffer(SoundBuffer* buffer)
+{
+  this->bufferList->add(buffer);
+}
+
+void SoundEngine::removeBuffer(SoundBuffer* buffer)
+{
+  this->bufferList->remove(buffer);
+}
+
+void SoundEngine::addSource(SoundSource* source)
+{
+  this->sourceList->add(source);
+}
+void SoundEngine::removeSource(SoundSource* source)
+{
+  this->sourceList->remove(source);
+}
+
+
+/**
+   \brief updates all The positions, Directions and Velocities of all Sounds
+*/
+void SoundEngine::update(void)
+{
+
+  // updating the Listeners Position
+  if (this->listener)
+    {
+      alListener3f(AL_POSITION,
+		   this->listener->getAbsCoor().x,
+		   this->listener->getAbsCoor().y,
+		   this->listener->getAbsCoor().z);
+      alListener3f(AL_VELOCITY,
+		   this->listener->getVelocity().x,
+		   this->listener->getVelocity().y,
+		   this->listener->getVelocity().z);
+      Vector absDirV = this->listener->getAbsDirV();
+      alListener3f(AL_ORIENTATION, 
+		   absDirV.x,
+		   absDirV.y,
+		   absDirV.z);
+    }
+  // updating all the Sources positions
+  tIterator<SoundSource>* iterator = this->sourceList->getIterator();
+  SoundSource* enumSource = iterator->nextElement();
+  while (enumSource)
+    {
+      alSource3f(enumSource->getID(), AL_POSITION,
+		 enumSource->getNode()->getAbsCoor().x,
+		 enumSource->getNode()->getAbsCoor().y,
+		 enumSource->getNode()->getAbsCoor().z);
+      alSource3f(enumSource->getID(), AL_VELOCITY,
+		 enumSource->getNode()->getVelocity().x,
+		 enumSource->getNode()->getVelocity().y,
+		 enumSource->getNode()->getVelocity().z);
+
+      enumSource = iterator->nextElement();
+    }
+  delete iterator;
+}
+
+/**
+   \brief initializes Audio in general
+*/
+bool SoundEngine::initAudio(void)
+{
+  alutInit(NULL, 0);
+  alGetError();
+}
+
Index: /orxonox/branches/openAL/src/lib/sound/sound_engine.h
===================================================================
--- /orxonox/branches/openAL/src/lib/sound/sound_engine.h	(revision 4195)
+++ /orxonox/branches/openAL/src/lib/sound/sound_engine.h	(revision 4196)
@@ -9,8 +9,46 @@
 
 #include "base_object.h"
+#include "alincl.h"
 
 // FORWARD DEFINITION
+class PNode;
+template<class T> class tList;
 
-//! A Class that handles audio via the openAudioLibrary
+
+//! A class that represents a datastructure to play Sounds.
+class SoundBuffer
+{
+ public:
+  SoundBuffer(const char* fileName);
+  ~SoundBuffer(void);
+
+ private:
+  ALuint bufferID;              //!< The address of the Buffer.
+
+  ALsizei size;                 //!< The size of the Buffer.
+  ALboolean loop;               //!< loop information.
+};
+
+//! A class that represents a SoundSource
+class SoundSource
+{
+ public:
+  SoundSource(SoundBuffer* buffer, PNode* sourceNode = NULL);
+  ~SoundSource(void);
+
+  /** \retruns The ID of the Source */
+  inline ALuint getID(void) { return this->sourceID; }
+  /** \returns the SourceNode of this Source */
+  inline PNode* getNode(void) { return this->sourceNode;}
+
+ private:
+  ALuint sourceID;              //!< The ID of the Source
+  SoundBuffer* buffer;          //!< The buffer to play in this source.
+  PNode* sourceNode;            //!< The SourceNode represente the position/velocity... of this source.
+};
+
+
+
+//! A class that handles audio via the openAudioLibrary
 class SoundEngine : public BaseObject {
 
@@ -19,7 +57,24 @@
   virtual ~SoundEngine(void);
 
+  void setListener(PNode* listener);
+
+  void addBuffer(SoundBuffer* buffer);
+  void removeBuffer(SoundBuffer* buffer);
+  void addSource(SoundSource* source);
+  void removeSource(SoundSource* source);
+
+
+  void update(void);
+
  private:
   SoundEngine(void);
   static SoundEngine* singletonRef;
+
+  bool initAudio(void);
+
+  PNode* listener;                 //!< The listener of the Scene
+  tList<SoundBuffer>* bufferList;  //!< A list of buffers
+  tList<SoundSource>* sourceList;  //!< A list for all the sources in the scene.
+
 };
 
Index: /orxonox/branches/openAL/src/orxonox.cc
===================================================================
--- /orxonox/branches/openAL/src/orxonox.cc	(revision 4195)
+++ /orxonox/branches/openAL/src/orxonox.cc	(revision 4196)
@@ -35,4 +35,5 @@
 #include "game_loader.h"
 #include "graphics_engine.h"
+#include "sound_engine.h"
 #include "resource_manager.h"
 #include "text_engine.h"
@@ -151,5 +152,5 @@
   printf("> Initializing sound\n");
   // SDL_Init(SDL_INIT_AUDIO);
-  printf("Not yet implemented\n");
+  SoundEngine::getInstance();
   return 0;
 }
