Index: /orxonox/branches/soundEngine/src/sound_control.cc
===================================================================
--- /orxonox/branches/soundEngine/src/sound_control.cc	(revision 3511)
+++ /orxonox/branches/soundEngine/src/sound_control.cc	(revision 3512)
@@ -16,4 +16,5 @@
 #include "sound_control.h"
 
+
 using namespace std;
 
@@ -28,5 +29,5 @@
 */ 
 SoundControl::SoundControl() {
-  init();
+  this->init();
 
 }
@@ -66,15 +67,22 @@
   this->bits = 0; 
   this->audio_format = MIX_DEFAULT_FORMAT;
+
+  // initialize SDL
+  this->isInit = false;
+  if (!SDL_Init(SDL_INIT_AUDIO))
+    {
+      PRINTF(1)("SDL-sound could not be initialized\n");
+      return;
+    }
+  else
+    this->isInit = true;
   
-  
-  Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels); 
-  bits=audio_format&0xFF; 
-  printf("Opened audio at %d Hz %d bit %s, %d bytes audio buffer\n", audio_rate, bits, audio_channels > 1 ? "stereo" : "mono", audio_buffers ); 
-  Mix_VolumeMusic(volume);
-
-  if(SDL_Init(SDL_INIT_AUDIO)<0)
-    printf("SDL_Init: INIT_AUDIO error.\n"); 
-  if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers))
-    printf("Mix_OpenAudio: Failed to open audio!\n"); 
+  Mix_QuerySpec(&this->audio_rate, &this->audio_format, &this->audio_channels); 
+  this->bits=this->audio_format&0xFF; 
+  PRINTF(3)("Opened audio at %d Hz %d bit %s, %d bytes audio buffer\n", this->audio_rate, this->bits, this->audio_channels > 1 ? "stereo" : "mono", this->audio_buffers ); 
+  Mix_VolumeMusic(this->volume);
+
+  if(Mix_OpenAudio(this->audio_rate, this->audio_format, this->audio_channels, this->audio_buffers))
+    PRINTF(1)("Mix_OpenAudio: Failed to open audio!\n"); 
  
   
@@ -115,6 +123,5 @@
 */ 
 void SoundControl::playOgg(char* fileName) {
-  Mix_Music* music = NULL;
-  music = Mix_LoadMUS(fileName);
+  Mix_Music* music = Mix_LoadMUS(fileName);
   if(Mix_PlayMusic(music, 1) == -1) {
     printf("Mix_PlayMusic: %s\n",Mix_GetError());
@@ -127,8 +134,8 @@
 */ 
 void SoundControl::volumeUp() { 
-  volume = (volume + 1) << 1; 
-  if(volume > SDL_MIX_MAXVOLUME) 
-    volume = SDL_MIX_MAXVOLUME; 
-  Mix_VolumeMusic(volume); 
+  this->volume = (this->volume++) << 1; 
+  if(this->volume > SDL_MIX_MAXVOLUME) 
+    this->volume = SDL_MIX_MAXVOLUME; 
+  Mix_VolumeMusic(this->volume); 
 } 
 
@@ -138,6 +145,8 @@
 */  
 void SoundControl::volumeDown() { 
-  volume >>= 1; 
-  Mix_VolumeMusic(volume); 
+  this->volume >>= 1;
+  if(this->volume < 0)
+    this->volume = 1;
+  Mix_VolumeMusic(this->volume); 
 } 
 
Index: /orxonox/branches/soundEngine/src/sound_control.h
===================================================================
--- /orxonox/branches/soundEngine/src/sound_control.h	(revision 3511)
+++ /orxonox/branches/soundEngine/src/sound_control.h	(revision 3512)
@@ -2,7 +2,6 @@
 #define SOUNDCONTROL_CLASS_H
 
-#include <SDL/SDL.h>
+#include "stdincl.h"
 #include <SDL/SDL_mixer.h>
-#include <stdio.h>
 
 class SoundControl {
@@ -37,16 +36,23 @@
   static SoundControl* singletonRef;
 
+  bool isInit;
+
  public:
+
   Mix_Music* music;
   static SoundControl* sound;
   int bits;
   int volume;
+
   int track_number;
-  int audio_rate, audio_channels, audio_buffers;
+  int audio_rate;
+  int audio_channels;
+  int audio_buffers;
   int done;
-  Uint16 audio_format;
   int sfx_channel1;
   int sfx_channel2;
   int finished;
+
+  Uint16 audio_format;
 };
 
Index: /orxonox/branches/soundEngine/src/sound_test.cc
===================================================================
--- /orxonox/branches/soundEngine/src/sound_test.cc	(revision 3511)
+++ /orxonox/branches/soundEngine/src/sound_test.cc	(revision 3512)
@@ -3,4 +3,5 @@
 #include "sound_control.h"
 
+int verbose = 3;
 
 /** 
@@ -51,5 +52,5 @@
   SoundControl* soundControl = SoundControl::getInstance();
 
-  SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO);
+  SDL_Init(SDL_INIT_VIDEO);
   screen = SDL_SetVideoMode(320, 240, 0, 0);
   while(!soundControl->finished) {
