Index: /orxonox/branches/sound_engine/src/Makefile.am
===================================================================
--- /orxonox/branches/sound_engine/src/Makefile.am	(revision 3886)
+++ /orxonox/branches/sound_engine/src/Makefile.am	(revision 3887)
@@ -8,4 +8,5 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/sound
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/lang
@@ -69,4 +70,5 @@
 		 lib/graphics/importer/material.cc \
 		 lib/graphics/importer/texture.cc \
+		 lib/sound/sound_engine.cc \
 		 lib/lang/base_entity.cc \
 		 lib/lang/base_object.cc \
@@ -125,4 +127,5 @@
 		 lib/graphics/light.h \
 		 lib/graphics/text_engine.h \
+		 lib/sound/sound_engine.h \
 		 lib/data/data_tank.h \
 		 lib/lang/base_entity.h \
Index: /orxonox/branches/sound_engine/src/Makefile.in
===================================================================
--- /orxonox/branches/sound_engine/src/Makefile.in	(revision 3886)
+++ /orxonox/branches/sound_engine/src/Makefile.in	(revision 3887)
@@ -68,7 +68,8 @@
 	text_engine.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \
 	primitive_model.$(OBJEXT) model.$(OBJEXT) material.$(OBJEXT) \
-	texture.$(OBJEXT) base_entity.$(OBJEXT) base_object.$(OBJEXT) \
-	ini_parser.$(OBJEXT) list.$(OBJEXT) resource_manager.$(OBJEXT) \
-	vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
+	texture.$(OBJEXT) sound_engine.$(OBJEXT) base_entity.$(OBJEXT) \
+	base_object.$(OBJEXT) ini_parser.$(OBJEXT) list.$(OBJEXT) \
+	resource_manager.$(OBJEXT) vector.$(OBJEXT) curve.$(OBJEXT) \
+	glmenu_imagescreen.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -102,4 +103,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/satellite.Po ./$(DEPDIR)/skybox.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/skysphere.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/sound_engine.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/terrain.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/test_bullet.Po ./$(DEPDIR)/test_gun.Po \
@@ -237,5 +239,5 @@
 target_vendor = @target_vendor@
 MAINSRCDIR = .
-AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common
+AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/sound -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common
 AM_LDFLAGS = $(MWINDOWS)
 orxonox_SOURCES = orxonox.cc \
@@ -279,4 +281,5 @@
 		 lib/graphics/importer/material.cc \
 		 lib/graphics/importer/texture.cc \
+		 lib/sound/sound_engine.cc \
 		 lib/lang/base_entity.cc \
 		 lib/lang/base_object.cc \
@@ -335,4 +338,5 @@
 		 lib/graphics/light.h \
 		 lib/graphics/text_engine.h \
+		 lib/sound/sound_engine.h \
 		 lib/data/data_tank.h \
 		 lib/lang/base_entity.h \
@@ -461,4 +465,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skybox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skysphere.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sound_engine.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terrain.Po@am__quote@
@@ -1017,4 +1022,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o texture.obj `if test -f 'lib/graphics/importer/texture.cc'; then $(CYGPATH_W) 'lib/graphics/importer/texture.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/importer/texture.cc'; fi`
+
+sound_engine.o: lib/sound/sound_engine.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sound_engine.o -MD -MP -MF "$(DEPDIR)/sound_engine.Tpo" -c -o sound_engine.o `test -f 'lib/sound/sound_engine.cc' || echo '$(srcdir)/'`lib/sound/sound_engine.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/sound_engine.Tpo" "$(DEPDIR)/sound_engine.Po"; else rm -f "$(DEPDIR)/sound_engine.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/sound/sound_engine.cc' object='sound_engine.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/sound_engine.Po' tmpdepfile='$(DEPDIR)/sound_engine.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sound_engine.o `test -f 'lib/sound/sound_engine.cc' || echo '$(srcdir)/'`lib/sound/sound_engine.cc
+
+sound_engine.obj: lib/sound/sound_engine.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sound_engine.obj -MD -MP -MF "$(DEPDIR)/sound_engine.Tpo" -c -o sound_engine.obj `if test -f 'lib/sound/sound_engine.cc'; then $(CYGPATH_W) 'lib/sound/sound_engine.cc'; else $(CYGPATH_W) '$(srcdir)/lib/sound/sound_engine.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/sound_engine.Tpo" "$(DEPDIR)/sound_engine.Po"; else rm -f "$(DEPDIR)/sound_engine.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/sound/sound_engine.cc' object='sound_engine.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/sound_engine.Po' tmpdepfile='$(DEPDIR)/sound_engine.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sound_engine.obj `if test -f 'lib/sound/sound_engine.cc'; then $(CYGPATH_W) 'lib/sound/sound_engine.cc'; else $(CYGPATH_W) '$(srcdir)/lib/sound/sound_engine.cc'; fi`
 
 base_entity.o: lib/lang/base_entity.cc
@@ -1268,5 +1289,5 @@
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/world_entities
+	$(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/sound $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/world_entities
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
Index: /orxonox/branches/sound_engine/src/defs/debug.h
===================================================================
--- /orxonox/branches/sound_engine/src/defs/debug.h	(revision 3886)
+++ /orxonox/branches/sound_engine/src/defs/debug.h	(revision 3887)
@@ -72,4 +72,5 @@
 #define DEBUG_MODULE_FONT               1
 #define DEBUG_MODULE_ANIM               1
+#define DEBUG_MODULE_SOUND              4
 
 #define DEBUG_MODULE_NULL_PARENT        0
Index: /orxonox/branches/sound_engine/src/lib/sound/sound_engine.cc
===================================================================
--- /orxonox/branches/sound_engine/src/lib/sound/sound_engine.cc	(revision 3887)
+++ /orxonox/branches/sound_engine/src/lib/sound/sound_engine.cc	(revision 3887)
@@ -0,0 +1,116 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+   
+   Some code was taken from Simon's first implementation of the SoundEngine.
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SOUND
+
+#include "sound_engine.h"
+
+using namespace std;
+
+/**
+   \brief standard constructor
+*/
+SoundEngine::SoundEngine () 
+{
+   this->setClassName ("SoundEngine");
+   this->isInit = false;
+   this->enableSound();
+}
+
+//! brief the singleton reference to this class
+SoundEngine* SoundEngine::singletonRef = NULL;
+
+/**
+   \returns a Pointer to this Class
+*/
+SoundEngine* SoundEngine::getInstance(void)
+{
+  if (!SoundEngine::singletonRef)
+    SoundEngine::singletonRef = new SoundEngine();
+  return SoundEngine::singletonRef;
+}
+
+/**
+   \brief standard deconstructor
+
+*/
+SoundEngine::~SoundEngine () 
+{
+  SoundEngine::singletonRef = NULL;
+  
+  this->disableSound();
+}
+
+
+/**
+   \brief enables the SDL_mixer library
+*/
+void SoundEngine::enableSound(void)
+{
+  if (!this->isInit)
+    if (SDL_Init(SDL_INIT_AUDIO))
+      {
+	PRINTF(1)("SDL-sound could not be initialized\n");
+	return;
+      }
+  this->isInit = true;
+}
+
+/**
+   \brief disabled SDL_mixer
+*/
+void SoundEngine::disableSound(void)
+{
+  if (this->isInit)
+    {
+      SDL_QuitSubSystem(SDL_INIT_AUDIO);
+    }
+  else
+    PRINTF(4)("SDL_mixer was not initialized.\n");
+}
+
+/**
+   \brief checks if the compiled version and the local version of SDL_mixer match.
+   \returns true if match, false otherwise
+*/
+bool SoundEngine::checkVersion(void)
+{
+  SDL_version compile_version;
+  SDL_version link_version;
+  MIX_VERSION(&compile_version);
+  link_version = *Mix_Linked_Version();
+
+  if (compile_version.major == link_version.major &&
+      compile_version.minor == link_version.minor &&
+      compile_version.patch == link_version.patch)
+    {
+      return true;
+    }
+  else
+    {
+      PRINTF(2)("compiled with SDL_mixer version: %d.%d.%d\n", 
+		compile_version.major,
+		compile_version.minor,
+		compile_version.patch);
+      
+      PRINTF(2)("running with SDL_mixer version: %d.%d.%d\n", 
+		link_version.major,
+		link_version.minor,
+		link_version.patch);
+      return false;
+    }
+}
Index: /orxonox/branches/sound_engine/src/lib/sound/sound_engine.h
===================================================================
--- /orxonox/branches/sound_engine/src/lib/sound/sound_engine.h	(revision 3887)
+++ /orxonox/branches/sound_engine/src/lib/sound/sound_engine.h	(revision 3887)
@@ -0,0 +1,50 @@
+/*! 
+    \file sound_engine.h
+    \brief Definition of the SoundEngine
+
+    !!AVOID!!:
+    SDL_OpenAudio
+     Use Mix_OpenAudio instead. 
+    SDL_CloseAudio
+     Use Mix_CloseAudio instead. 
+    SDL_PauseAudio
+     Use Mix_Pause(-1) and Mix_PauseMusic instead, to pause.
+     Use Mix_Resume(-1) and Mix_ResumeMusic instead, to unpause. 
+    SDL_LockAudio
+     This is just not needed since SDL_mixer handles this for you.
+     Using it may cause problems as well. 
+    SDL_UnlockAudio
+     This is just not needed since SDL_mixer handles this for you.
+     Using it may cause problems as well. 
+*/
+
+#ifndef _SOUND_ENGINE_H
+#define _SOUND_ENGINE_H
+
+#include "base_object.h"
+#include <SDL_mixer.h>
+
+// FORWARD DEFINITION
+
+//! The Main Sound Engine
+class SoundEngine : public BaseObject {
+
+ public:
+  static SoundEngine* getInstance(void);
+  virtual ~SoundEngine(void);
+
+ private:
+  SoundEngine(void);
+  static SoundEngine* singletonRef;
+
+  
+  
+  void enableSound(void);
+  void disableSound(void);
+  static bool checkVersion(void);
+
+  bool isInit;
+};
+
+
+#endif /* _SOUND_ENGINE_H */
Index: /orxonox/branches/sound_engine/src/orxonox.cc
===================================================================
--- /orxonox/branches/sound_engine/src/orxonox.cc	(revision 3886)
+++ /orxonox/branches/sound_engine/src/orxonox.cc	(revision 3887)
@@ -32,4 +32,5 @@
 #include "game_loader.h"
 #include "graphics_engine.h"
+#include "sound_engine.h"
 #include "resource_manager.h"
 #include "text_engine.h"
@@ -57,5 +58,6 @@
   if( localinput != NULL) delete world;
   if( resources != NULL) delete resources;
-  delete GraphicsEngine::getInstance(); // deleting the Graphics
+  delete GraphicsEngine::getInstance(); // delets the Graphics Engine
+  delete SoundEngine::getInstance();    // deletes the Sound Engine
   delete ResourceManager::getInstance(); // deletes the Resource Manager
   delete TextEngine::getInstance();
@@ -131,6 +133,6 @@
 {
   printf("> Initializing sound\n");
-  // SDL_Init(SDL_INIT_AUDIO);
-  printf("Not yet implemented\n");
+  SoundEngine::getInstance();
+  printf("implementing\n");
   return 0;
 }
