Index: /code/trunk/src/audio/AudioBuffer.cc
===================================================================
--- /code/trunk/src/audio/AudioBuffer.cc	(revision 1783)
+++ /code/trunk/src/audio/AudioBuffer.cc	(revision 1784)
@@ -31,28 +31,28 @@
 namespace audio
 {
-	AudioBuffer::AudioBuffer(std::string fileName)
-	{
-		// Load wav data into buffers.
-		alGenBuffers(1, &buffer);
+    AudioBuffer::AudioBuffer(std::string fileName)
+    {
+        // Load wav data into buffers.
+        alGenBuffers(1, &buffer);
 
-		if(alGetError() != AL_NO_ERROR)
-			loaded=AL_FALSE;
+        if (alGetError() != AL_NO_ERROR)
+            loaded=AL_FALSE;
 
-    //FIXME deprecated; seems unneeded
-// 		alutLoadWAVFile((ALbyte*)fileName.c_str(), &format, &data, &size, &freq, &loop);
-		alBufferData(buffer, format, data, size, freq);
-    //FIXME deprecated; seems unneeded
-// 		alutUnloadWAV(format, data, size, freq);
+        //FIXME deprecated; seems unneeded
+//        alutLoadWAVFile((ALbyte*)fileName.c_str(), &format, &data, &size, &freq, &loop);
+        alBufferData(buffer, format, data, size, freq);
+        //FIXME deprecated; seems unneeded
+//        alutUnloadWAV(format, data, size, freq);
 
-		// Do another error check and return.
-		if(alGetError() != AL_NO_ERROR)
-			loaded=AL_FALSE;
-    else
-		  loaded=AL_TRUE;
-	}
+        // Do another error check and return.
+        if (alGetError() != AL_NO_ERROR)
+            loaded=AL_FALSE;
+        else
+              loaded=AL_TRUE;
+    }
 
-	AudioBuffer::~AudioBuffer()
-	{
+    AudioBuffer::~AudioBuffer()
+    {
 
-	}
+    }
 }
Index: /code/trunk/src/audio/AudioBuffer.h
===================================================================
--- /code/trunk/src/audio/AudioBuffer.h	(revision 1783)
+++ /code/trunk/src/audio/AudioBuffer.h	(revision 1784)
@@ -33,28 +33,28 @@
 
 #include <string>
-
 #include <AL/al.h>
 
 namespace audio
 {
-	class _AudioExport AudioBuffer
-	{
-	public:
-		AudioBuffer(std::string fileName);
-		~AudioBuffer();
-	private:
-		// Buffers hold sound data.
-		ALuint buffer;
-		// Identifier
-		std::string name;
-		// True if AL was able to load data
-		ALboolean loaded;
+    class _AudioExport AudioBuffer
+    {
+    public:
+        AudioBuffer(std::string fileName);
+        ~AudioBuffer();
 
-		ALenum format;
-		ALsizei size;
-		ALvoid* data;
-		ALsizei freq;
-		ALboolean loop;
-	};
+    private:
+        // Buffers hold sound data.
+        ALuint buffer;
+        // Identifier
+        std::string name;
+        // True if AL was able to load data
+        ALboolean loaded;
+
+        ALenum format;
+        ALsizei size;
+        ALvoid* data;
+        ALsizei freq;
+        ALboolean loop;
+    };
 }
 
Index: /code/trunk/src/audio/AudioIncludes.h
===================================================================
--- /code/trunk/src/audio/AudioIncludes.h	(revision 1783)
+++ /code/trunk/src/audio/AudioIncludes.h	(revision 1784)
@@ -46,4 +46,2 @@
 #include <vorbis/vorbisenc.h>
 #include <vorbis/vorbisfile.h>
-
-#include "util/Error.h"
Index: /code/trunk/src/audio/AudioManager.cc
===================================================================
--- /code/trunk/src/audio/AudioManager.cc	(revision 1783)
+++ /code/trunk/src/audio/AudioManager.cc	(revision 1784)
@@ -30,120 +30,116 @@
 
 #include <cstdlib>
-
 #include <AL/alut.h>
 
+#include "util/Debug.h"
 #include "AudioBuffer.h"
 #include "AudioSource.h"
 #include "AudioStream.h"
-#include "util/Error.h"
-#include "util/Debug.h"
 
 namespace audio
 {
-	AudioManager::AudioManager()
-	{
-    ambientPath = "audio/ambient";
+    AudioManager::AudioManager()
+    {
+        ambientPath = "audio/ambient";
 
-    alutInit(NULL, 0);
+        alutInit(NULL, 0);
+    }
 
+    AudioManager::~AudioManager()
+    {
+        for (unsigned int i=0;i<bgSounds.size();i++)
+        {
+            bgSounds[i]->release();
+        }
+        alutExit();
+    }
 
-	}
+    void AudioManager::ambientStart()
+    {
+// 		currentBgSound = 0;
+        if (bgSounds.size() > 0)
+        {
+            currentBgSound = rand() % bgSounds.size();
+            if(!bgSounds[currentBgSound]->playback())
+            {
+                COUT(2) << "AudioManager: Ogg refused to play." << std::endl;
+            }
+            else
+            {
+                COUT(3) << "Info: Started playing background sound" << std::endl;
+            }
+        }
+    }
 
-	AudioManager::~AudioManager()
-	{
-		for (unsigned int i=0;i<bgSounds.size();i++)
-		{
-			bgSounds[i]->release();
-		}
-		alutExit();
-	}
+    void AudioManager::ambientStop()
+    {
+        COUT(3) << "Info: Stopped playing background sound" << std::endl;
+    }
 
-	void AudioManager::ambientStart()
-	{
-// 		currentBgSound = 0;
-		if (bgSounds.size() > 0)
-		{
-      currentBgSound = rand() % bgSounds.size();
-			if(!bgSounds[currentBgSound]->playback())
-			{
-    		orxonox::Error("Ogg refused to play.");
-			}
-			else
-			{
-				COUT(3) << "Info: Started playing background sound" << std::endl;
-			}
-		}
-	}
+    void AudioManager::ambientAdd(std::string file)
+    {
+        std::string path = ambientPath + "/" + file + ".ogg";
+        AudioStream* tmp = new AudioStream(path);
+        tmp->open();
+        if (tmp->isLoaded())
+        {
+            bgSounds.push_back(tmp);
+            COUT(3) << "Info: Added background sound " << file << std::endl;
+        }
+    }
 
-	void AudioManager::ambientStop()
-	{
-		COUT(3) << "Info: Stopped playing background sound" << std::endl;
-	}
+    void AudioManager::tick(float dt)
+    {
+        if (bgSounds.size() > 0)
+        {
+            if (bgSounds[currentBgSound]->isLoaded())
+            {
+                bool playing = bgSounds[currentBgSound]->update();
+                if (!bgSounds[currentBgSound]->playing() && playing)
+                {
+                    if (!bgSounds[currentBgSound]->playback())
+                        COUT(2) << "AudioManager: Ogg abruptly stopped." << std::endl;
+                    else
+                        COUT(2) << "AudioManager: Ogg stream was interrupted." << std::endl;
 
-	void AudioManager::ambientAdd(std::string file)
-	{
-    std::string path = ambientPath + "/" + file + ".ogg";
-		AudioStream* tmp = new AudioStream(path);
-		tmp->open();
-		if (tmp->isLoaded())
-		{
-			bgSounds.push_back(tmp);
-			COUT(3) << "Info: Added background sound " << file << std::endl;
-		}
-	}
+                }
+                if (!playing)
+                {
+//                    if (currentBgSound < bgSounds.size()-1)
+//                    {
+//                        currentBgSound++;
+//                    }
+//                    else
+//                    {
+//                        currentBgSound=0;
+//                    }
+                    // switch to next sound in list/array
+                    currentBgSound = ++currentBgSound % bgSounds.size();
 
-	void AudioManager::tick(float dt)
-	{
-		if (bgSounds.size() > 0)
-		{
-			if (bgSounds[currentBgSound]->isLoaded())
-			{
-				bool playing = bgSounds[currentBgSound]->update();
-		    if(!bgSounds[currentBgSound]->playing() && playing)
-		    {
-		        if(!bgSounds[currentBgSound]->playback())
-		            orxonox::Error("Ogg abruptly stopped.");
-		        else
-		            orxonox::Error("Ogg stream was interrupted.");
+                    if (!bgSounds[currentBgSound]->isLoaded())
+                    {
+                        bgSounds[currentBgSound]->release();
+                        bgSounds[currentBgSound]->open();
+                    }
+                    bgSounds[currentBgSound]->playback();
+                    COUT(3) << "Info: Playing next background sound" << std::endl;
+                }
+            }
+        }
+    }
 
-		    }
-				if (!playing)
-				{
-// 					if (currentBgSound < bgSounds.size()-1)
-// 					{
-// 						currentBgSound++;
-// 					}
-// 					else
-// 					{
-// 						currentBgSound=0;
-// 					}
-          // switch to next sound in list/array
-          currentBgSound = ++currentBgSound % bgSounds.size();
+    void AudioManager::setPos(std::vector<float> newPosition)
+    {
 
-					if (!bgSounds[currentBgSound]->isLoaded())
-					{
-						bgSounds[currentBgSound]->release();
-						bgSounds[currentBgSound]->open();
-					}
-					bgSounds[currentBgSound]->playback();
-					COUT(3) << "Info: Playing next background sound" << std::endl;
-				}
-			}
-		}
-	}
+    }
 
-	void AudioManager::setPos(std::vector<float> newPosition)
-	{
+    void AudioManager::setSpeed(std::vector<float> newSpeed)
+    {
 
-	}
+    }
 
-	void AudioManager::setSpeed(std::vector<float> newSpeed)
-	{
+    void AudioManager::setOri(std::vector<float> at, std::vector<float> up)
+    {
 
-	}
-
-	void AudioManager::setOri(std::vector<float> at, std::vector<float> up)
-	{
-
-	}
+    }
 }
Index: /code/trunk/src/audio/AudioManager.h
===================================================================
--- /code/trunk/src/audio/AudioManager.h	(revision 1783)
+++ /code/trunk/src/audio/AudioManager.h	(revision 1784)
@@ -37,54 +37,51 @@
 namespace audio
 {
-  class _AudioExport AudioManager
-	{
-	public:
+    class _AudioExport AudioManager
+    {
+    public:
+        // Init audio
+        AudioManager();
 
-		// Init audio
-		AudioManager();
+        // Kill audio and set buffers, sources and memory free
+        ~AudioManager();
 
-		// Kill audio and set buffers, sources and memory free
-		~AudioManager();
+        // Set listener position
+        void setPos(std::vector<float> newPosition);
 
-		// Set listener position
-		void setPos(std::vector<float> newPosition);
+        // Set listener speed
+        void setSpeed(std::vector<float> newSpeed);
 
-		// Set listener speed
-		void setSpeed(std::vector<float> newSpeed);
+        // Set listener orientation (first is direction
+        // the listener looks at, the second is the direction
+        // upwards the listener)
+        void setOri(std::vector<float> at, std::vector<float> up);
 
-		// Set listener orientation (first is direction
-		// the listener looks at, the second is the direction
-		// upwards the listener)
-		void setOri(std::vector<float> at, std::vector<float> up);
+        // Update
+        void tick(float dt);
 
-		// Update
-		void tick(float dt);
+        void ambientAdd(std::string file);
+        void ambientStart();
+        void ambientStop();
 
-		void ambientAdd(std::string file);
-		void ambientStart();
-		void ambientStop();
-
-	private:
-
-		// Background sound
-    std::vector<AudioStream*> bgSounds;
-		int currentBgSound;
+    private:
+        // Background sound
+        std::vector<AudioStream*> bgSounds;
+        int currentBgSound;
 
 
+        std::string ambientPath;
 
-		std::string ambientPath;
+        // Vector containing all audio files
+        std::vector<AudioBuffer*> buffers;
+        // Vector containing all audio sources which referer to one buffer
+        std::vector<AudioSource*> sources;
+        // The ambient background sound
+        AudioSource* ambient;
 
-		// Vector containing all audio files
-		std::vector<AudioBuffer*> buffers;
-		// Vector containing all audio sources which referer to one buffer
-		std::vector<AudioSource*> sources;
-		// The ambient background sound
-		AudioSource* ambient;
-
-		std::vector<float> listenerPosition;
-		std::vector<float> listenerSpeed;
-		std::vector<float> listenerAt;
-		std::vector<float> listenerup;
-	};
+        std::vector<float> listenerPosition;
+        std::vector<float> listenerSpeed;
+        std::vector<float> listenerAt;
+        std::vector<float> listenerup;
+    };
 }
 
Index: /code/trunk/src/audio/AudioSource.cc
===================================================================
--- /code/trunk/src/audio/AudioSource.cc	(revision 1783)
+++ /code/trunk/src/audio/AudioSource.cc	(revision 1784)
@@ -31,12 +31,12 @@
 namespace audio
 {
-	AudioSource::AudioSource()
-	{
+    AudioSource::AudioSource()
+    {
 
-	}
+    }
 
-	AudioSource::~AudioSource()
-	{
+    AudioSource::~AudioSource()
+    {
 
-	}
+    }
 }
Index: /code/trunk/src/audio/AudioSource.h
===================================================================
--- /code/trunk/src/audio/AudioSource.h	(revision 1783)
+++ /code/trunk/src/audio/AudioSource.h	(revision 1784)
@@ -34,12 +34,12 @@
 namespace audio
 {
-	class _AudioExport AudioSource
-	{
-	public:
-		AudioSource();
-		~AudioSource();
-	private:
+    class _AudioExport AudioSource
+    {
+    public:
+        AudioSource();
+        ~AudioSource();
 
-	};
+    private:
+    };
 }
 
Index: /code/trunk/src/audio/AudioStream.cc
===================================================================
--- /code/trunk/src/audio/AudioStream.cc	(revision 1783)
+++ /code/trunk/src/audio/AudioStream.cc	(revision 1784)
@@ -26,253 +26,247 @@
  *
  */
+
 #include "AudioStream.h"
-
 #include "util/Debug.h"
-#include "util/Error.h"
 
 namespace audio
 {
-  AudioStream::AudioStream(std::string path)
-	{
-		this->path = path;
-		loaded = false;
-	}
-
-	void AudioStream::open()
-	{
-	    int result;
-
-      oggFile = fopen(path.c_str(), "rb");
-	    if(!oggFile)
-			{
-	    	orxonox::Error("Could not open Ogg file "+path);
-				return;
-			}
-
-	    if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
-	    {
-        fclose(oggFile);
-	      orxonox::Error("Could not open Ogg stream. " + errorString(result));
-				return;
-	    }
-
-			loaded = true;
-
-	    vorbisInfo = ov_info(&oggStream, -1);
-	    vorbisComment = ov_comment(&oggStream, -1);
-
-	    if(vorbisInfo->channels == 1)
-	        format = AL_FORMAT_MONO16;
-	    else
-	        format = AL_FORMAT_STEREO16;
-
-
-	    alGenBuffers(2, buffers);
-	    check();
-	    alGenSources(1, &source);
-	    check();
-
-	    alSource3f(source, AL_POSITION,        0.0, 0.0, 0.0);
-	    alSource3f(source, AL_VELOCITY,        0.0, 0.0, 0.0);
-	    alSource3f(source, AL_DIRECTION,       0.0, 0.0, 0.0);
-	    alSourcef (source, AL_ROLLOFF_FACTOR,  0.0          );
-	    alSourcei (source, AL_SOURCE_RELATIVE, AL_FALSE      );
-	}
-
-
-
-
-	void AudioStream::release()
-	{
-
-	    alSourceStop(source);
-	    empty();
-	    alDeleteSources(1, &source);
-	    check();
-	    alDeleteBuffers(1, buffers);
-	    check();
-
-	    ov_clear(&oggStream);
-			loaded = false;
-
-	}
-
-
-
-
-	void AudioStream::display()
-	{
-		if (loaded)
-		{
-	    COUT(3)
-	        << "version         " << vorbisInfo->version         << std::endl
-	        << "channels        " << vorbisInfo->channels        << std::endl
-	        << "rate (hz)       " << vorbisInfo->rate            << std::endl
-	        << "bitrate upper   " << vorbisInfo->bitrate_upper   << std::endl
-	        << "bitrate nominal " << vorbisInfo->bitrate_nominal << std::endl
-	        << "bitrate lower   " << vorbisInfo->bitrate_lower   << std::endl
-	        << "bitrate window  " << vorbisInfo->bitrate_window  << std::endl
-	        << std::endl
-	        << "vendor " << vorbisComment->vendor << std::endl;
-
-	    for(int i = 0; i < vorbisComment->comments; i++)
-	    {
-	        COUT(3) << "   " << vorbisComment->user_comments[i] << std::endl;
-	    }
-
-	    COUT(3) << std::endl;
-		}
-	}
-
-
-
-
-	bool AudioStream::playback()
-	{
-		if (!loaded)
-		{
-			return false;
-		}
-
-	    if(playing())
-	        return true;
-
-	    if(!stream(buffers[0]))
-	        return false;
-
-	    if(!stream(buffers[1]))
-	        return false;
-
-	    alSourceQueueBuffers(source, 2, buffers);
-	    alSourcePlay(source);
-
-	    return true;
-	}
-
-
-
-
-	bool AudioStream::playing()
-	{
-		if (!loaded)
-		{
-			return false;
-		}
-
-	    ALenum state;
-	    alGetSourcei(source, AL_SOURCE_STATE, &state);
-	    return (state == AL_PLAYING);
-	}
-
-
-
-
-	bool AudioStream::update()
-	{
-	    int processed;
-	    bool active = true;
-
-	    alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
-
-	    while(processed--)
-	    {
-	        ALuint buffer;
-
-	        alSourceUnqueueBuffers(source, 1, &buffer);
-	        check();
-
-	        active = stream(buffer);
-
-	        alSourceQueueBuffers(source, 1, &buffer);
-	        check();
-	    }
-
-			if (active==false)
-			{
-				loaded = false;
-			}
-	    return active;
-	}
-
-
-
-
-	bool AudioStream::stream(ALuint buffer)
-	{
-	    char pcm[BUFFER_SIZE];
-	    int  size = 0;
-	    int  section;
-	    int  result;
-
-	    while(size < BUFFER_SIZE)
-	    {
-	        result = ov_read(&oggStream, pcm + size, BUFFER_SIZE - size, 0, 2, 1, &section);
-
-	        if(result > 0)
-	            size += result;
-	        else
-	            if(result < 0)
-	                orxonox::Error(errorString(result));
-	            else
-	                break;
-	    }
-
-	    if(size == 0)
-	        return false;
-
-	    alBufferData(buffer, format, pcm, size, vorbisInfo->rate);
-	    check();
-
-	    return true;
-	}
-
-
-
-	void AudioStream::empty()
-	{
-	    int queued;
-
-	    alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
-
-	    while(queued--)
-	    {
-	        ALuint buffer;
-
-	        alSourceUnqueueBuffers(source, 1, &buffer);
-	        check();
-	    }
-	}
-
-
-
-
-	void AudioStream::check()
-	{
-		int error = alGetError();
-
-		if(error != AL_NO_ERROR)
-			orxonox::Error("OpenAL error was raised.");
-	}
-
-
-
-	std::string AudioStream::errorString(int code)
-	{
-	    switch(code)
-	    {
-	        case OV_EREAD:
-	            return std::string("Read from media.");
-	        case OV_ENOTVORBIS:
-	            return std::string("Not Vorbis data.");
-	        case OV_EVERSION:
-	            return std::string("Vorbis version mismatch.");
-	        case OV_EBADHEADER:
-	            return std::string("Invalid Vorbis header.");
-	        case OV_EFAULT:
-	            return std::string("Internal logic fault (bug or heap/stack corruption.");
-	        default:
-	            return std::string("Unknown Ogg error.");
-	    }
-	}
+    AudioStream::AudioStream(std::string path)
+    {
+        this->path = path;
+        loaded = false;
+    }
+
+    void AudioStream::open()
+    {
+        int result;
+
+        oggFile = fopen(path.c_str(), "rb");
+        if (!oggFile)
+        {
+            COUT(2) << "AudioStream: Could not open Ogg file " << path << std::endl;
+            return;
+        }
+
+        if ((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
+        {
+            fclose(oggFile);
+            COUT(2) << "AudioStream: Could not open Ogg stream. " << errorString(result) << std::endl;
+            return;
+        }
+
+        loaded = true;
+
+        vorbisInfo = ov_info(&oggStream, -1);
+        vorbisComment = ov_comment(&oggStream, -1);
+
+        if (vorbisInfo->channels == 1)
+            format = AL_FORMAT_MONO16;
+        else
+            format = AL_FORMAT_STEREO16;
+
+
+        alGenBuffers(2, buffers);
+        check();
+        alGenSources(1, &source);
+        check();
+
+        alSource3f(source, AL_POSITION,        0.0, 0.0, 0.0);
+        alSource3f(source, AL_VELOCITY,        0.0, 0.0, 0.0);
+        alSource3f(source, AL_DIRECTION,       0.0, 0.0, 0.0);
+        alSourcef (source, AL_ROLLOFF_FACTOR,  0.0          );
+        alSourcei (source, AL_SOURCE_RELATIVE, AL_FALSE     );
+    }
+
+
+
+    void AudioStream::release()
+    {
+        alSourceStop(source);
+        empty();
+        alDeleteSources(1, &source);
+        check();
+        alDeleteBuffers(1, buffers);
+        check();
+
+        ov_clear(&oggStream);
+        loaded = false;
+    }
+
+
+
+    void AudioStream::display()
+    {
+        if (loaded)
+        {
+            COUT(3)
+                << "version         " << vorbisInfo->version         << std::endl
+                << "channels        " << vorbisInfo->channels        << std::endl
+                << "rate (hz)       " << vorbisInfo->rate            << std::endl
+                << "bitrate upper   " << vorbisInfo->bitrate_upper   << std::endl
+                << "bitrate nominal " << vorbisInfo->bitrate_nominal << std::endl
+                << "bitrate lower   " << vorbisInfo->bitrate_lower   << std::endl
+                << "bitrate window  " << vorbisInfo->bitrate_window  << std::endl
+                << std::endl
+                << "vendor " << vorbisComment->vendor << std::endl;
+
+            for (int i = 0; i < vorbisComment->comments; i++)
+            {
+                COUT(3) << "   " << vorbisComment->user_comments[i] << std::endl;
+            }
+
+            COUT(3) << std::endl;
+        }
+    }
+
+
+
+    bool AudioStream::playback()
+    {
+        if (!loaded)
+        {
+            return false;
+        }
+
+        if (playing())
+            return true;
+
+        if (!stream(buffers[0]))
+            return false;
+
+        if (!stream(buffers[1]))
+            return false;
+
+        alSourceQueueBuffers(source, 2, buffers);
+        alSourcePlay(source);
+
+        return true;
+    }
+
+
+
+
+    bool AudioStream::playing()
+    {
+        if (!loaded)
+        {
+            return false;
+        }
+
+        ALenum state;
+        alGetSourcei(source, AL_SOURCE_STATE, &state);
+        return (state == AL_PLAYING);
+    }
+
+
+
+
+    bool AudioStream::update()
+    {
+        int processed;
+        bool active = true;
+
+        alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
+
+        while (processed--)
+        {
+            ALuint buffer;
+
+            alSourceUnqueueBuffers(source, 1, &buffer);
+            check();
+
+            active = stream(buffer);
+
+            alSourceQueueBuffers(source, 1, &buffer);
+            check();
+        }
+
+        if (active==false)
+        {
+            loaded = false;
+        }
+        return active;
+    }
+
+
+
+
+    bool AudioStream::stream(ALuint buffer)
+    {
+        char pcm[BUFFER_SIZE];
+        int  size = 0;
+        int  section;
+        int  result;
+
+        while (size < BUFFER_SIZE)
+        {
+            result = ov_read(&oggStream, pcm + size, BUFFER_SIZE - size, 0, 2, 1, &section);
+
+            if (result > 0)
+                size += result;
+            else
+                if (result < 0)
+                    COUT(2) << "AudioStream: " << errorString(result) << std::endl;
+                else
+                    break;
+        }
+
+        if (size == 0)
+            return false;
+
+        alBufferData(buffer, format, pcm, size, vorbisInfo->rate);
+        check();
+
+        return true;
+    }
+
+
+
+    void AudioStream::empty()
+    {
+        int queued;
+
+        alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
+
+        while (queued--)
+        {
+            ALuint buffer;
+
+            alSourceUnqueueBuffers(source, 1, &buffer);
+            check();
+        }
+    }
+
+
+
+
+    void AudioStream::check()
+    {
+        int error = alGetError();
+
+        if (error != AL_NO_ERROR)
+            COUT(2) << "AudioStream: OpenAL error was raised." << std::endl;
+    }
+
+
+
+    std::string AudioStream::errorString(int code)
+    {
+        switch (code)
+        {
+            case OV_EREAD:
+                return std::string("Read from media.");
+            case OV_ENOTVORBIS:
+                return std::string("Not Vorbis data.");
+            case OV_EVERSION:
+                return std::string("Vorbis version mismatch.");
+            case OV_EBADHEADER:
+                return std::string("Invalid Vorbis header.");
+            case OV_EFAULT:
+                return std::string("Internal logic fault (bug or heap/stack corruption.");
+            default:
+                return std::string("Unknown Ogg error.");
+        }
+    }
 }
 
Index: /code/trunk/src/audio/AudioStream.h
===================================================================
--- /code/trunk/src/audio/AudioStream.h	(revision 1783)
+++ /code/trunk/src/audio/AudioStream.h	(revision 1784)
@@ -34,44 +34,44 @@
 #include <string>
 #include <iostream>
-
 #include <AL/al.h>
 #include <vorbis/vorbisfile.h>
 #include <vorbis/codec.h>
 
+
 namespace audio
 {
-  #define BUFFER_SIZE (4096 * 4)
+    const int BUFFER_SIZE = 4096 * 4;
 
-  class _AudioExport AudioStream
-  {
+    class _AudioExport AudioStream
+    {
     public:
-      AudioStream(std::string path);
-      void open();
-      void release();
-      void display();
-      bool playback();
-      bool playing();
-      bool update();
-      inline bool isLoaded() { return loaded; }
+        AudioStream(std::string path);
+        void open();
+        void release();
+        void display();
+        bool playback();
+        bool playing();
+        bool update();
+        inline bool isLoaded() { return loaded; }
 
     protected:
-      bool stream(ALuint buffer);
-      void empty();
-      void check();
-      std::string errorString(int code);
+        bool stream(ALuint buffer);
+        void empty();
+        void check();
+        std::string errorString(int code);
 
     private:
-      std::string path;
+        std::string path;
 
-      FILE*           oggFile;
-      OggVorbis_File  oggStream;
-      vorbis_info*    vorbisInfo;
-      vorbis_comment* vorbisComment;
-      bool loaded;
+        FILE*           oggFile;
+        OggVorbis_File  oggStream;
+        vorbis_info*    vorbisInfo;
+        vorbis_comment* vorbisComment;
+        bool loaded;
 
-      ALuint buffers[2];
-      ALuint source;
-      ALenum format;
-  };
+        ALuint buffers[2];
+        ALuint source;
+        ALenum format;
+    };
 }
 
Index: /code/trunk/src/core/ArgumentCompletionListElement.h
===================================================================
--- /code/trunk/src/core/ArgumentCompletionListElement.h	(revision 1783)
+++ /code/trunk/src/core/ArgumentCompletionListElement.h	(revision 1784)
@@ -35,10 +35,11 @@
 #include <list>
 
-#define ACL_MODE_NORMAL    1
-#define ACL_MODE_LOWERCASE 2
-#define ACL_MODE_DISPLAY   4
 
 namespace orxonox
 {
+    const int ACL_MODE_NORMAL    = 1;
+    const int ACL_MODE_LOWERCASE = 2;
+    const int ACL_MODE_DISPLAY   = 4;
+
     typedef std::list<ArgumentCompletionListElement> ArgumentCompletionList;
 
Index: /code/trunk/src/core/CommandExecutor.cc
===================================================================
--- /code/trunk/src/core/CommandExecutor.cc	(revision 1783)
+++ /code/trunk/src/core/CommandExecutor.cc	(revision 1784)
@@ -30,5 +30,4 @@
 #include "ConsoleCommand.h"
 #include "util/String.h"
-#include "util/Convert.h"
 #include "util/Debug.h"
 #include "Identifier.h"
Index: /code/trunk/src/core/ConfigFileManager.cc
===================================================================
--- /code/trunk/src/core/ConfigFileManager.cc	(revision 1783)
+++ /code/trunk/src/core/ConfigFileManager.cc	(revision 1784)
@@ -34,8 +34,10 @@
 #include "util/String.h"
 
-#define CONFIG_FILE_MAX_LINELENGHT 1024
 
 namespace orxonox
 {
+    const int CONFIG_FILE_MAX_LINELENGHT  = 1024;
+    const char* const DEFAULT_CONFIG_FILE = "default.ini";
+
     SetConsoleCommandShortcutExtern(config).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue());
     SetConsoleCommandShortcutExtern(tconfig).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue());
Index: /code/trunk/src/core/ConfigFileManager.h
===================================================================
--- /code/trunk/src/core/ConfigFileManager.h	(revision 1783)
+++ /code/trunk/src/core/ConfigFileManager.h	(revision 1784)
@@ -38,6 +38,4 @@
 
 #include "util/Math.h"
-
-#define DEFAULT_CONFIG_FILE "default.ini"
 
 namespace orxonox
Index: /code/trunk/src/core/ConfigValueContainer.cc
===================================================================
--- /code/trunk/src/core/ConfigValueContainer.cc	(revision 1783)
+++ /code/trunk/src/core/ConfigValueContainer.cc	(revision 1784)
@@ -41,9 +41,10 @@
 #include "Identifier.h"
 
-#define MAX_VECTOR_INDEX 255 // to avoid up to 4*10^9 vector entries in the config file after accidentally using a wrong argument
 
 
 namespace orxonox
 {
+    const int MAX_VECTOR_INDEX  = 255; // to avoid up to 4*10^9 vector entries in the config file after accidentally using a wrong argument
+
     /**
         @brief Initializes the ConfigValueContainer with defaultvalues.
Index: /code/trunk/src/core/Functor.h
===================================================================
--- /code/trunk/src/core/Functor.h	(revision 1783)
+++ /code/trunk/src/core/Functor.h	(revision 1784)
@@ -36,8 +36,9 @@
 #include "util/Debug.h"
 
-#define MAX_FUNCTOR_ARGUMENTS 5
 
 namespace orxonox
 {
+    const int MAX_FUNCTOR_ARGUMENTS = 5;
+
     enum FunctionType
     {
Index: /code/trunk/src/core/IRC.cc
===================================================================
--- /code/trunk/src/core/IRC.cc	(revision 1783)
+++ /code/trunk/src/core/IRC.cc	(revision 1784)
@@ -35,8 +35,9 @@
 #include "util/Convert.h"
 
-#define IRC_TCL_THREADID 1421421421
 
 namespace orxonox
 {
+    static const unsigned int IRC_TCL_THREADID  = 1421421421;
+
     SetConsoleCommand(IRC, say,  true).accessLevel(AccessLevel::User);
     SetConsoleCommand(IRC, msg,  false).accessLevel(AccessLevel::User);
Index: /code/trunk/src/core/TclThreadManager.cc
===================================================================
--- /code/trunk/src/core/TclThreadManager.cc	(revision 1783)
+++ /code/trunk/src/core/TclThreadManager.cc	(revision 1784)
@@ -43,9 +43,10 @@
 #include "util/Convert.h"
 
-#define TCLTHREADMANAGER_MAX_QUEUE_LENGTH 100
-#define TCLTHREADMANAGER_MAX_CPU_USAGE 0.50
 
 namespace orxonox
 {
+    const int TCLTHREADMANAGER_MAX_QUEUE_LENGTH = 100;
+    const int TCLTHREADMANAGER_MAX_CPU_USAGE    = 0.50;
+
     SetConsoleCommandShortcutAlias(TclThreadManager, execute, "tclexecute").argumentCompleter(0, autocompletion::tclthreads());
     SetConsoleCommandShortcutAlias(TclThreadManager, query,   "tclquery"  ).argumentCompleter(0, autocompletion::tclthreads());
Index: /code/trunk/src/orxonox/Settings.h
===================================================================
--- /code/trunk/src/orxonox/Settings.h	(revision 1783)
+++ /code/trunk/src/orxonox/Settings.h	(revision 1784)
@@ -43,5 +43,4 @@
 #include "util/Debug.h"
 #include "util/MultiType.h"
-#include "util/Convert.h"
 
 namespace orxonox
Index: /code/trunk/src/orxonox/gui/OgreCEGUIRenderer.h
===================================================================
--- /code/trunk/src/orxonox/gui/OgreCEGUIRenderer.h	(revision 1783)
+++ /code/trunk/src/orxonox/gui/OgreCEGUIRenderer.h	(revision 1784)
@@ -27,6 +27,6 @@
     This file contains code that is specific to Ogre (http://www.ogre3d.org)
 *************************************************************************/
-#ifndef _OgreCEGUIRenderer_h_
-#define _OgreCEGUIRenderer_h_
+#ifndef _OgreCEGUIRenderer_H__
+#define _OgreCEGUIRenderer_H__
 
 #include <CEGUIBase.h>
@@ -462,3 +462,3 @@
 
 
-#endif	// end of guard _OgreCEGUIRenderer_h_
+#endif	// end of guard _OgreCEGUIRenderer_H__
Index: /code/trunk/src/orxonox/gui/OgreCEGUIResourceProvider.h
===================================================================
--- /code/trunk/src/orxonox/gui/OgreCEGUIResourceProvider.h	(revision 1783)
+++ /code/trunk/src/orxonox/gui/OgreCEGUIResourceProvider.h	(revision 1784)
@@ -24,6 +24,6 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *************************************************************************/
-#ifndef _OgreCEGUIResourceProvider_h_
-#define _OgreCEGUIResourceProvider_h_
+#ifndef _OgreCEGUIResourceProvider_H__
+#define _OgreCEGUIResourceProvider_H__
 
 #include <CEGUIResourceProvider.h>
@@ -50,3 +50,3 @@
 } // End of  CEGUI namespace section
 
-#endif	// end of guard _OgreCEGUIResourceProvider_h_
+#endif	// end of guard _OgreCEGUIResourceProvider_H__
Index: /code/trunk/src/orxonox/gui/OgreCEGUITexture.h
===================================================================
--- /code/trunk/src/orxonox/gui/OgreCEGUITexture.h	(revision 1783)
+++ /code/trunk/src/orxonox/gui/OgreCEGUITexture.h	(revision 1784)
@@ -24,6 +24,6 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *************************************************************************/
-#ifndef _OgreCEGUITexture_h_
-#define _OgreCEGUITexture_h_
+#ifndef _OgreCEGUITexture_H__
+#define _OgreCEGUITexture_H__
 
 #include <CEGUIBase.h>
@@ -177,3 +177,3 @@
 
 
-#endif	// end of guard _OgreCEGUITexture_h_
+#endif	// end of guard _OgreCEGUITexture_H__
Index: /code/trunk/src/orxonox/objects/Ambient.cc
===================================================================
--- /code/trunk/src/orxonox/objects/Ambient.cc	(revision 1783)
+++ /code/trunk/src/orxonox/objects/Ambient.cc	(revision 1784)
@@ -37,5 +37,4 @@
 #include "tinyxml/tinyxml.h"
 #include "util/SubString.h"
-#include "util/Convert.h"
 #include "util/Math.h"
 #include "util/Debug.h"
Index: /code/trunk/src/orxonox/objects/Camera.cc
===================================================================
--- /code/trunk/src/orxonox/objects/Camera.cc	(revision 1783)
+++ /code/trunk/src/orxonox/objects/Camera.cc	(revision 1784)
@@ -40,5 +40,4 @@
 #include "tinyxml/tinyxml.h"
 #include "util/SubString.h"
-#include "util/Convert.h"
 #include "util/Math.h"
 #include "util/Debug.h"
Index: /code/trunk/src/orxonox/objects/SpaceShipAI.cc
===================================================================
--- /code/trunk/src/orxonox/objects/SpaceShipAI.cc	(revision 1783)
+++ /code/trunk/src/orxonox/objects/SpaceShipAI.cc	(revision 1784)
@@ -41,8 +41,9 @@
 #include "Settings.h"
 
-#define ACTION_INTERVAL 1.0f
 
 namespace orxonox
 {
+    const float ACTION_INTERVAL = 1.0f;
+
     SetConsoleCommand(SpaceShipAI, createEnemy, true).defaultValue(0, 1);
     SetConsoleCommand(SpaceShipAI, killEnemies, true).defaultValue(0, 0);
Index: /code/trunk/src/orxonox/objects/SpaceShipAI.h
===================================================================
--- /code/trunk/src/orxonox/objects/SpaceShipAI.h	(revision 1783)
+++ /code/trunk/src/orxonox/objects/SpaceShipAI.h	(revision 1784)
@@ -36,8 +36,9 @@
 #include "util/Math.h"
 
-#define NUM_AI_TEAMS 3
 
 namespace orxonox
 {
+    const int NUM_AI_TEAMS = 3;
+
     class SpaceShipAI : public SpaceShip
     {
Index: /code/trunk/src/orxonox/overlays/OverlayText.cc
===================================================================
--- /code/trunk/src/orxonox/overlays/OverlayText.cc	(revision 1783)
+++ /code/trunk/src/orxonox/overlays/OverlayText.cc	(revision 1784)
@@ -34,5 +34,4 @@
 #include <OgrePanelOverlayElement.h>
 
-#include "util/Convert.h"
 #include "util/String.h"
 #include "core/CoreIncludes.h"
Index: /code/trunk/src/orxonox/overlays/console/InGameConsole.cc
===================================================================
--- /code/trunk/src/orxonox/overlays/console/InGameConsole.cc	(revision 1783)
+++ /code/trunk/src/orxonox/overlays/console/InGameConsole.cc	(revision 1784)
@@ -50,9 +50,9 @@
 #include "GraphicsEngine.h"
 
-#define LINES 30
-#define CHAR_WIDTH 7.45 // fix this please - determine the char-width dynamically
-
 namespace orxonox
 {
+    const int LINES = 30;
+    const float CHAR_WIDTH = 7.45f; // fix this please - determine the char-width dynamically
+
     SetConsoleCommand(InGameConsole, openConsole, true);
     SetConsoleCommand(InGameConsole, closeConsole, true);
Index: /code/trunk/src/util/CRC32.h
===================================================================
--- /code/trunk/src/util/CRC32.h	(revision 1783)
+++ /code/trunk/src/util/CRC32.h	(revision 1784)
@@ -34,5 +34,5 @@
 #include "Integers.h"
 
-#define UTIL_CRC32POLY 0x04C11DB7 /* CRC-32 Polynom */
+const unsigned int UTIL_CRC32POLY = 0x04C11DB7; /* CRC-32 Polynom */
 
 _UtilExport void calcCRCBit(uint32_t &crc32, int bit);
Index: /code/trunk/src/util/OutputBuffer.cc
===================================================================
--- /code/trunk/src/util/OutputBuffer.cc	(revision 1783)
+++ /code/trunk/src/util/OutputBuffer.cc	(revision 1784)
@@ -29,8 +29,9 @@
 #include "OutputBuffer.h"
 
-#define OUTPUTBUFFER_MAX_LINE_LENGTH 16384
 
 namespace orxonox
 {
+    const int OUTPUTBUFFER_MAX_LINE_LENGTH = 16384;
+
     void OutputBuffer::registerListener(OutputBufferListener* listener)
     {
Index: /code/trunk/src/util/SubString.h
===================================================================
--- /code/trunk/src/util/SubString.h	(revision 1783)
+++ /code/trunk/src/util/SubString.h	(revision 1784)
@@ -56,6 +56,6 @@
  */
 
-#ifndef __SUBSTRING_H__
-#define __SUBSTRING_H__
+#ifndef __SubString_H__
+#define __SubString_H__
 
 #include "UtilPrereqs.h"
@@ -171,3 +171,3 @@
 };
 
-#endif /* __SUBSTRING_H__ */
+#endif /* __SubString_H__ */
