Index: code/branches/FICN/src/audio/AudioStream.cc
===================================================================
--- code/branches/FICN/src/audio/AudioStream.cc	(revision 430)
+++ code/branches/FICN/src/audio/AudioStream.cc	(revision 513)
@@ -1,2 +1,29 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
 
 #include "AudioStream.h"
@@ -8,5 +35,5 @@
 		this->path = path;
 		loaded = false;
-	}	
+	}
 
 	void AudioStream::open()
@@ -14,5 +41,5 @@
 	    int result;
 
-	    
+
 	    if(!(oggFile = fopen(path.c_str(), "rb")))
 			{
@@ -23,5 +50,5 @@
 	    if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
 	    {
-        fclose(oggFile);	        
+        fclose(oggFile);
 	      orxonox::Error("Could not open Ogg stream. " + errorString(result));
 				return;
@@ -29,19 +56,19 @@
 
 			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);
@@ -50,8 +77,8 @@
 	    alSourcei (source, AL_SOURCE_RELATIVE, AL_FALSE      );
 	}
-	
-	
-	
-	
+
+
+
+
 	void AudioStream::release()
 	{
@@ -63,13 +90,13 @@
 	    alDeleteBuffers(1, buffers);
 	    check();
-	
+
 	    ov_clear(&oggStream);
 			loaded = false;
-		
-	}
-	
-	
-	
-	
+
+	}
+
+
+
+
 	void AudioStream::display()
 	{
@@ -86,15 +113,15 @@
 	        << "\n"
 	        << "vendor " << vorbisComment->vendor << "\n";
-	        
+
 	    for(int i = 0; i < vorbisComment->comments; i++)
 	        std::cout << "   " << vorbisComment->user_comments[i] << "\n";
-	        
-	    std::cout << std::endl;	
+
+	    std::cout << std::endl;
 		}
 	}
-	
-	
-	
-	
+
+
+
+
 	bool AudioStream::playback()
 	{
@@ -106,20 +133,20 @@
 	    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()
 	{
@@ -133,28 +160,28 @@
 	    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)
 			{
@@ -163,8 +190,8 @@
 	    return active;
 	}
-	
-	
-	
-	
+
+
+
+
 	bool AudioStream::stream(ALuint buffer)
 	{
@@ -173,9 +200,9 @@
 	    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;
@@ -186,44 +213,44 @@
 	                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)
 	{
