Index: /orxonox/branches/sound/config.h.in
===================================================================
--- /orxonox/branches/sound/config.h.in	(revision 2853)
+++ /orxonox/branches/sound/config.h.in	(revision 2854)
@@ -34,4 +34,7 @@
 /* Define to 1 if you have the <SDL/SDL.h> header file. */
 #undef HAVE_SDL_SDL_H
+
+/* Define to 1 if you have the <SDL/SDL_mixer.h> header file. */
+#undef HAVE_SDL_SDL_MIXER_H
 
 /* Define to 1 if you have the `sqrt' function. */
Index: /orxonox/branches/sound/configure
===================================================================
--- /orxonox/branches/sound/configure	(revision 2853)
+++ /orxonox/branches/sound/configure	(revision 2854)
@@ -4393,4 +4393,161 @@
     fi
 fi
+
+
+for ac_header in SDL/SDL_mixer.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------- ##
+## Report this to orxonox-dev@mail.datacore.ch ##
+## ------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  { { echo "$as_me:$LINENO: error: cannot find sdlmixer headers" >&5
+echo "$as_me: error: cannot find sdlmixer headers" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+done
+
+
+LIBS="$LIBS -lSDL_mixer"
 
 # FIXME: Replace `main' with a function in `-lOSMesa':
Index: /orxonox/branches/sound/configure.ac
===================================================================
--- /orxonox/branches/sound/configure.ac	(revision 2853)
+++ /orxonox/branches/sound/configure.ac	(revision 2854)
@@ -77,4 +77,9 @@
 fi
 
+AC_CHECK_HEADERS(SDL/SDL_mixer.h ,,
+      [AC_MSG_ERROR([cannot find sdlmixer headers]) ])
+
+LIBS="$LIBS -lSDL_mixer"
+
 # FIXME: Replace `main' with a function in `-lOSMesa':
 AC_CHECK_LIB([OSMesa], [main])
Index: xonox/branches/sound/docs/setting_up_gcc_on_Windows_with_minGW
===================================================================
--- /orxonox/branches/sound/docs/setting_up_gcc_on_Windows_with_minGW	(revision 2853)
+++ 	(revision )
@@ -1,25 +1,0 @@
-Setting up gcc on Windows with minGW
-
-gcc is a free compiler. It's licensed under the GNU GPL. It's the most common compiler on linux systems. There are ports of it for windows. So basically all programs that you create in linux will work in windows. 
-
-The first thing you need to do is download gcc (NOTE: about 9 megs) along with the required SDL and GL libraries and header files (NOTE: glut isn't included) and then just extract all of them into c:\. After that you must copy the folders i386-mingw32msvc, include and lib  from c:\gcc-2.95.2 into c:\usr\local\cross-tools\i386-mingw32msvc. (NOTE: copy, don't move them) 
-
-You need to know now, how to compile the programs. There are two ways on how to compile programs with gcc. One is typing in the commands manually, the other is using makefiles. To use gcc or run the makefiles, you need to be in a shell enviroment. Run c:\gcc-2.95.2\mingw32.bat to get the basic shell command line. Now  say ./configure; make;
-
-Notice that small files will be created such as stdout.txt and stderr.txt. These files contain all the output that has been outputted to the console. It's a good bug reporting system: if your program crashes, output some data to STDOUT or STDERR (you know: printf("ERROR: %s",error); It's as simple as that.
-
-But now, how do you make your own programs? Let's suppose that you're in the shell (mingw32.bat) and in a directory that contains 2 .cpp files: somefile.cpp and somefile2.cpp and you would like to compile them into a program called someprogram. 
-In linux this is what you should type in to make your vision come to life: 
-
-gcc somefile.cpp somefile2.cpp -lGL -lGLU -lSDL -lpthread -o someprogram 
-
-This line tells gcc to compile 2 source code files somefile.cpp and somefile2.cpp using the GL, GLU, SDL and pthread libraries (they have -l behind them) into a program called someprogram (the -o marks the output file). 
-
-In windows you'd have to modify it to this line: 
-gcc -g -O2 -IC:/gcc-2.95.2/include -IC:/gcc-2.95.2/include/SDL -Dmain=SDL_main -DHAVE_OPENGL -o someprogram somefile.cpp somefile2.cpp -L//C/gcc-2.95.2/lib -lmingw32 -lSDLmain -lSDL -lglu32 -lopengl32 -lglut -mwindows 
-
-Simple, isn't it? Ok, it isn't. Basically you don't need to know what every part of it does and type it in every time you want to compile a program. Just create a shell script (like a .bat like file in dos) instead. Fire up notepad or something similar and type in or copy/paste the same text (for example). 
-
-Now save it as compile.sh into the directory your source files resist. Presumably somewhere under c:\gcc-2.95.2\. Run the mingw32.bat file, cd to your dir and type in sh compile.sh. It should compile the program if all goes well. 
-
-One more thing: a very important file with SDL is the file SDL.dll. If you want to run SDL programs, then you must have the file SDL.dll inside c:\windows\system (win 95, 98, ME) or c:\windows\system32 (on windows NT, 2000 and XP) or in the same folder as your SDL program executable.
Index: /orxonox/branches/sound/src/Makefile
===================================================================
--- /orxonox/branches/sound/src/Makefile	(revision 2854)
+++ /orxonox/branches/sound/src/Makefile	(revision 2854)
@@ -0,0 +1,453 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# src/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+srcdir = .
+top_srcdir = ..
+
+pkgdatadir = $(datadir)/orxonox
+pkglibdir = $(libdir)/orxonox
+pkgincludedir = $(includedir)/orxonox
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+ACLOCAL = ${SHELL} /root/orxonox/branches/sound/missing --run aclocal-1.7
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /root/orxonox/branches/sound/missing --run tar
+AUTOCONF = ${SHELL} /root/orxonox/branches/sound/missing --run autoconf
+AUTOHEADER = ${SHELL} /root/orxonox/branches/sound/missing --run autoheader
+AUTOMAKE = ${SHELL} /root/orxonox/branches/sound/missing --run automake-1.7
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = -lm  -lGL -lGLU -lSDL_mixer -lSDL -lpthread -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /root/orxonox/branches/sound/missing --run makeinfo
+MSBITFIELDS = 
+OBJEXT = o
+PACKAGE = orxonox
+PACKAGE_BUGREPORT = orxonox-dev@mail.datacore.ch
+PACKAGE_NAME = orxonox
+PACKAGE_STRING = orxonox 0.1-pre-alpha
+PACKAGE_TARNAME = orxonox
+PACKAGE_VERSION = 0.1-pre-alpha
+PATH_SEPARATOR = :
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = 
+VERSION = 0.1-pre-alpha
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_STRIP = 
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+bindir = ${exec_prefix}/bin
+build_alias = 
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host_alias = 
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /root/orxonox/branches/sound/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+AM_CXXFLAGS = "-I/usr/X11R6/include"
+AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
+
+
+#"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
+bin_PROGRAMS = orxonox sound
+orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc game_loader.cc campaign.cc story_entity.cc
+
+sound_SOURCES = sound_test.cc sound_control.cc
+
+noinst_HEADERS = ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = orxonox$(EXEEXT) sound$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) player.$(OBJEXT) \
+	data_tank.$(OBJEXT) world_entity.$(OBJEXT) vector.$(OBJEXT) \
+	camera.$(OBJEXT) collision.$(OBJEXT) command_node.$(OBJEXT) \
+	ini_parser.$(OBJEXT) keynames.$(OBJEXT) track.$(OBJEXT) \
+	base_entity.$(OBJEXT) game_loader.$(OBJEXT) campaign.$(OBJEXT) \
+	story_entity.$(OBJEXT)
+orxonox_OBJECTS = $(am_orxonox_OBJECTS)
+orxonox_LDADD = $(LDADD)
+orxonox_DEPENDENCIES =
+orxonox_LDFLAGS =
+am_sound_OBJECTS = sound_test.$(OBJEXT) sound_control.$(OBJEXT)
+sound_OBJECTS = $(am_sound_OBJECTS)
+sound_LDADD = $(LDADD)
+sound_DEPENDENCIES =
+sound_LDFLAGS =
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+DEP_FILES = ./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
+	./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
+	./$(DEPDIR)/command_node.Po \
+	./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/game_loader.Po \
+	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
+	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
+	./$(DEPDIR)/sound_control.Po \
+	./$(DEPDIR)/sound_test.Po \
+	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/track.Po \
+	./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
+	./$(DEPDIR)/world_entity.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+DIST_SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
+HEADERS = $(noinst_HEADERS)
+
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.in INSTALL \
+	Makefile.am
+SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+orxonox$(EXEEXT): $(orxonox_OBJECTS) $(orxonox_DEPENDENCIES) 
+	@rm -f orxonox$(EXEEXT)
+	$(CXXLINK) $(orxonox_LDFLAGS) $(orxonox_OBJECTS) $(orxonox_LDADD) $(LIBS)
+sound$(EXEEXT): $(sound_OBJECTS) $(sound_DEPENDENCIES) 
+	@rm -f sound$(EXEEXT)
+	$(CXXLINK) $(sound_LDFLAGS) $(sound_OBJECTS) $(sound_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/base_entity.Po
+include ./$(DEPDIR)/camera.Po
+include ./$(DEPDIR)/campaign.Po
+include ./$(DEPDIR)/collision.Po
+include ./$(DEPDIR)/command_node.Po
+include ./$(DEPDIR)/data_tank.Po
+include ./$(DEPDIR)/game_loader.Po
+include ./$(DEPDIR)/ini_parser.Po
+include ./$(DEPDIR)/keynames.Po
+include ./$(DEPDIR)/orxonox.Po
+include ./$(DEPDIR)/player.Po
+include ./$(DEPDIR)/sound_control.Po
+include ./$(DEPDIR)/sound_test.Po
+include ./$(DEPDIR)/story_entity.Po
+include ./$(DEPDIR)/track.Po
+include ./$(DEPDIR)/vector.Po
+include ./$(DEPDIR)/world.Po
+include ./$(DEPDIR)/world_entity.Po
+
+.cc.o:
+	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+	fi
+#	source='$<' object='$@' libtool=no \
+#	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cc.obj:
+	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+	fi
+#	source='$<' object='$@' libtool=no \
+#	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am
+
+
+#  uncomment the following if bencoder requires the math library
+#orxonox_LDADD=-lm
+
+#EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
+
+#  if you write a self-test script named `chk', uncomment the
+#  following and add `chk' to the EXTRA_DIST list
+#TESTS=chk
+
+#  build and install the .info pages
+#info_TEXINFOS = orxonox.texinfo
+#orxonox_TEXINFOS = gpl.texinfo
+
+#  install the man pages
+#man_MANS=orxonox.1
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /orxonox/branches/sound/src/Makefile.am
===================================================================
--- /orxonox/branches/sound/src/Makefile.am	(revision 2853)
+++ /orxonox/branches/sound/src/Makefile.am	(revision 2854)
@@ -5,6 +5,8 @@
 
 
-bin_PROGRAMS=orxonox
+bin_PROGRAMS=orxonox sound
 orxonox_SOURCES=orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc game_loader.cc campaign.cc story_entity.cc
+
+sound_SOURCES=sound_test.cc sound_control.cc
 
 noinst_HEADERS=ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h
Index: /orxonox/branches/sound/src/Makefile.in
===================================================================
--- /orxonox/branches/sound/src/Makefile.in	(revision 2853)
+++ /orxonox/branches/sound/src/Makefile.in	(revision 2854)
@@ -116,6 +116,8 @@
 
 #"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
-bin_PROGRAMS = orxonox
+bin_PROGRAMS = orxonox sound
 orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc game_loader.cc campaign.cc story_entity.cc
+
+sound_SOURCES = sound_test.cc sound_control.cc
 
 noinst_HEADERS = ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h
@@ -125,5 +127,5 @@
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
-bin_PROGRAMS = orxonox$(EXEEXT)
+bin_PROGRAMS = orxonox$(EXEEXT) sound$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS)
 
@@ -138,4 +140,9 @@
 orxonox_DEPENDENCIES =
 orxonox_LDFLAGS =
+am_sound_OBJECTS = sound_test.$(OBJEXT) sound_control.$(OBJEXT)
+sound_OBJECTS = $(am_sound_OBJECTS)
+sound_LDADD = $(LDADD)
+sound_DEPENDENCIES =
+sound_LDFLAGS =
 
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
@@ -148,4 +155,6 @@
 @AMDEP_TRUE@	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/sound_control.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/sound_test.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/track.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
@@ -156,10 +165,10 @@
 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
-DIST_SOURCES = $(orxonox_SOURCES)
+DIST_SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
 HEADERS = $(noinst_HEADERS)
 
 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.in INSTALL \
 	Makefile.am
-SOURCES = $(orxonox_SOURCES)
+SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
 
 all: all-am
@@ -199,4 +208,7 @@
 	@rm -f orxonox$(EXEEXT)
 	$(CXXLINK) $(orxonox_LDFLAGS) $(orxonox_OBJECTS) $(orxonox_LDADD) $(LIBS)
+sound$(EXEEXT): $(sound_OBJECTS) $(sound_DEPENDENCIES) 
+	@rm -f sound$(EXEEXT)
+	$(CXXLINK) $(sound_LDFLAGS) $(sound_OBJECTS) $(sound_LDADD) $(LIBS)
 
 mostlyclean-compile:
@@ -217,4 +229,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sound_control.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sound_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track.Po@am__quote@
Index: /orxonox/branches/sound/src/sound_control.cc
===================================================================
--- /orxonox/branches/sound/src/sound_control.cc	(revision 2853)
+++ /orxonox/branches/sound/src/sound_control.cc	(revision 2854)
@@ -15,16 +15,16 @@
 
 #include "sound_control.h"
-#include <string.h> 
-#include "SDL_mixer.h" 
 
 using namespace std;
 
 // global variables
-
-SoundControl* SoundControl::instance = 0; // singleton reference
-int volume = SDL_MIX_MAXVOLUME; // volume
-int done = 0; // 
+SoundControl* SoundControl::instance = NULL; // singleton reference
+int volume = SDL_MIX_MAXVOLUME;
+int done = 0;
 int track_number = 1;
-Mix_Music* music = NULL; 
+static Mix_Music* music = NULL;
+int audio_rate = MIX_DEFAULT_FREQUENCY, audio_channels = MIX_DEFAULT_CHANNELS, audio_buffers = 16384, bits = 0; 
+Uint16 audio_format = MIX_DEFAULT_FORMAT;
+
 
 /** 
@@ -35,18 +35,14 @@
 */ 
 SoundControl::SoundControl () { 
- 
-  //setup parameters 
-  int audio_rate = MIX_DEFAULT_FREQUENCY, audio_channels = MIX_DEFAULT_CHANNELS, audio_buffers = 8192, bits = 0; 
-  Uint16 audio_format = MIX_DEFAULT_FORMAT; 
-
-  //initializing sound and calling Mix_OpenAudio 
+
+  /*
+  initializing sound and calling Mix_OpenAudio 
   if(SDL_Init(SDL_INIT_AUDIO)<0){ 
-    printf("SDL_Init: \n"); 
-    exit(1); 
+    printf("SDL_Init: INIT_AUDIO error.\n"); 
   } 
+  */
   
   if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers)){ 
-    printf("Mix_OpenAudio: \n"); 
-    exit(1); 
+    printf("Mix_OpenAudio: Failed to open audio!\n"); 
   } 
   
@@ -56,9 +52,7 @@
 
 /** 
-    \brief Destructor for the singleton instance 
+    \brief Default destructor 
 */ 
 SoundControl::~SoundControl () { 
-  delete instance;
-  instance = 0;
 }
 
@@ -67,5 +61,5 @@
 */
 SoundControl* SoundControl::getInstance() {
-  if (instance == 0) {
+  if (instance == NULL) {
     instance = new SoundControl;
   }
@@ -74,5 +68,6 @@
 
 void SoundControl::deleteInstance() {
-  ~SoundControl();
+  delete instance;
+  instance = NULL;
 }
 
@@ -186,5 +181,5 @@
 */ 
 void SoundControl::pauseMusic () {
-  Mix_PauseMusic()
+  Mix_PauseMusic();
 } 
 
@@ -194,5 +189,5 @@
 */ 
 void SoundControl::resumeMusic () {
-  Mix_ResumeMusic()
+  Mix_ResumeMusic();
 } 
 
@@ -200,5 +195,5 @@
     \brief Selects the track of all orxonox tracks 
 */
-void SoundControl::trackSelect () { 
+void SoundControl::trackSelect() { 
   switch (track_number) { 
   case 1:
@@ -219,8 +214,8 @@
     music = Mix_LoadMUS("luke_grey_orxonox3.ogg"); 
     if(Mix_PlayMusic(music, 1) == -1){
-    printf("Mix_PlayMusic: %s\n",Mix_GetError());
-  }
-  Mix_HookMusicFinished(musicDone);    
-  break; 
+      printf("Mix_PlayMusic: %s\n",Mix_GetError());
+    }
+    Mix_HookMusicFinished(musicDone);    
+    break; 
   case 4: 
     music = Mix_LoadMUS("luke_grey_and_aquarius_orxonox.ogg"); 
@@ -239,9 +234,9 @@
   case 6:
     music = Mix_LoadMUS("nomenes_funkadudu.ogg");
-  if(Mix_PlayMusic(music, 1) == -1){
-    printf("Mix_PlayMusic: %s\n",Mix_GetError());
-  }
-  Mix_HookMusicFinished(musicDone);    
-break;
+    if(Mix_PlayMusic(music, 1) == -1){
+      printf("Mix_PlayMusic: %s\n",Mix_GetError());
+    }
+    Mix_HookMusicFinished(musicDone);
+    break;
   } 
 }
@@ -251,6 +246,5 @@
     \brief Hooked by playOgg at end of .ogg playback
 */ 
-void SoundControl::musicDone () {
-  track_number++; 
+void SoundControl::musicDone() {
   Mix_HaltMusic();
   Mix_FreeMusic(music);
Index: /orxonox/branches/sound/src/sound_control.h
===================================================================
--- /orxonox/branches/sound/src/sound_control.h	(revision 2853)
+++ /orxonox/branches/sound/src/sound_control.h	(revision 2854)
@@ -2,5 +2,7 @@
 #define SOUNDCONTROL_CLASS_H
 
-#include "data_tank.h"
+#include "SDL/SDL.h"
+#include "SDL/SDL_mixer.h"
+#include <stdio.h>
 
 class SoundControl {
@@ -9,5 +11,5 @@
   static SoundControl* getInstance();
   static void deleteInstance();
-  void setNumberOfChannels(int number_of channels);
+  void setNumberOfChannels(int number_of_channels);
   int playMod(char* filename);
   int playWav(char* filename);
@@ -21,4 +23,5 @@
   void resumeMusic();
   void trackSelect();
+  static void musicDone();
 
 protected:
@@ -29,6 +32,5 @@
 private:
   static SoundControl* instance;
-
-}
+};
 
 #endif
Index: /orxonox/branches/sound/src/sound_test.cc
===================================================================
--- /orxonox/branches/sound/src/sound_test.cc	(revision 2853)
+++ /orxonox/branches/sound/src/sound_test.cc	(revision 2854)
@@ -14,30 +14,35 @@
 */
 
-
 #include "sound_test.h"
-#include "SDL.h"
-#include "SDL_mixer.h"
 
 using namespace std;
 
-SoundControl* test;
+SoundControl* sound = NULL;
+int counter = 0;
+int through = 0;
 
-SoundTest::SoundTest () {
-  test = SoundControl::getInstance();
+SoundTest::SoundTest() {
+  sound = SoundControl::getInstance();
 }
 
 
-SoundTest::~SoundTest () {
-  
+SoundTest::~SoundTest() {
+  sound->deleteInstance();
 }
 
 
-void main (void) {
+int main(void) {
+  SoundTest();
   SDL_Surface *screen;
-  SDL_Init(SDL_INIT_VIDEO); 
+  SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO); 
   screen = SDL_SetVideoMode(320, 240, 0, 0);
-  SoundControl* sound = new SoundControl;
-  sound.SoundControl();
-  sound->playOgg(music.ogg);
-  sound.~SoundControl();
+  sound->playOgg("music.ogg");
+  while(!through) {
+    SDL_Delay(100);
+    if(counter >= 1000) {
+    	through = 1;
+    }
+    counter++;
+  }
+  SDL_Quit();
 }
Index: /orxonox/branches/sound/src/sound_test.h
===================================================================
--- /orxonox/branches/sound/src/sound_test.h	(revision 2853)
+++ /orxonox/branches/sound/src/sound_test.h	(revision 2854)
@@ -1,15 +1,18 @@
-
 #ifndef SOUND_TEST_H
 #define SOUND_TEST_H
 
-#include "data_tank.h"
-
+#include "sound_control.h"
+#include "SDL/SDL.h"
+#include "SDL/SDL_mixer.h"
 
 class SoundTest {
 
  public:
-  SoundTest ();
-  ~SoundTest ();
-  void main (void);
+  SoundTest();
+  ~SoundTest();
+  int main (void);
+  SoundControl* sound;
+  int counter;
+  int through;
 };
 
