Index: code/branches/sound5/src/orxonox/sound/AmbientSound.cc
===================================================================
--- code/branches/sound5/src/orxonox/sound/AmbientSound.cc	(revision 6673)
+++ code/branches/sound5/src/orxonox/sound/AmbientSound.cc	(revision 6674)
@@ -194,3 +194,23 @@
         this->soundstreamthread_.interrupt();
     }
+
+    void AmbientSound::doPlay()
+    {
+        BaseSound::doPlay();
+
+        if(GameMode::playsSound() && this->getSourceState() != AL_PLAYING)
+        {
+            if(!alIsSource(this->audioSource_))
+            {
+                this->audioSource_ = SoundManager::getInstance().getSoundSource(this);
+                if(!alIsSource(this->audioSource_))
+                    return;
+                this->initialiseSource();
+            }
+
+            alSourcePlay(this->audioSource_);
+            if(int error = alGetError())
+                COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl;
+        }
+    }
 }
Index: code/branches/sound5/src/orxonox/sound/AmbientSound.h
===================================================================
--- code/branches/sound5/src/orxonox/sound/AmbientSound.h	(revision 6673)
+++ code/branches/sound5/src/orxonox/sound/AmbientSound.h	(revision 6674)
@@ -74,4 +74,5 @@
 
         void doStop();
+        void doPlay();
 
     private:
Index: code/branches/sound5/src/orxonox/sound/SoundStreamer.cc
===================================================================
--- code/branches/sound5/src/orxonox/sound/SoundStreamer.cc	(revision 6673)
+++ code/branches/sound5/src/orxonox/sound/SoundStreamer.cc	(revision 6674)
@@ -27,4 +27,5 @@
 #include "SoundStreamer.h"
 
+#include <boost/thread.hpp>
 #include <al.h>
 #include <alc.h>
@@ -42,4 +43,5 @@
     void orxonox::SoundStreamer::operator()(ALuint audioSource, DataStreamPtr dataStream)
     {
+        COUT(4) << "Sound: Creating thread for " << dataStream->getName() << std::endl;
         // Open file with custom streaming
         ov_callbacks vorbisCallbacks;
@@ -65,7 +67,7 @@
             format = AL_FORMAT_STEREO16;
 
-        char inbuffer[256*1024];
-        ALuint initbuffers[4];
-        alGenBuffers(4, initbuffers);
+        char inbuffer[4096];
+        ALuint initbuffers[20];
+        alGenBuffers(20, initbuffers);
         if (ALint error = alGetError()) {
             COUT(2) << "Sound: Streamer: Could not generate buffer:" << getALErrorString(error) << std::endl;
@@ -74,10 +76,10 @@
         int current_section;
 
-        for(int i = 0; i < 4; i++)
+        for(int i = 0; i < 20; i++)
         {
             long ret = ov_read(&vf, inbuffer, sizeof(inbuffer), 0, 2, 1, &current_section);
             if (ret == 0)
             {
-                return;
+                break;
             }
             else if (ret < 0)
@@ -89,9 +91,13 @@
 
             alBufferData(initbuffers[i], format, &inbuffer, ret, vorbisInfo->rate);
-            alGetError();
-        }
-        alSourceQueueBuffers(audioSource, 4, initbuffers);
-        if (ALint error = alGetError()) {
-            COUT(2) << "Sound: Warning: Couldn't queue buffers: " << getALErrorString(error) << std::endl;
+            if(ALint error = alGetError()) {
+                COUT(2) << "Sound: Could not fill buffer: " << getALErrorString(error) << std::endl;
+                break;
+             }
+             alSourceQueueBuffers(audioSource, 1, &initbuffers[i]);
+             if (ALint error = alGetError()) {
+                 COUT(2) << "Sound: Warning: Couldn't queue buffers: " << getALErrorString(error) << std::endl;
+             }
+             COUT(4) << "Sound: " << ret << std::endl;
         }
 
@@ -100,13 +106,18 @@
             int processed;
 
-        if(alcGetCurrentContext() == NULL)
-            COUT(2) << "This should not be!" << std::endl;
+            if(alcGetCurrentContext() == NULL)
+            {
+                COUT(2) << "Sound: There is no context, terminating thread" << std::endl;
+                return;
+            }
 
             alGetSourcei(audioSource, AL_BUFFERS_PROCESSED, &processed);
             if (ALint error = alGetError())
-            COUT(2) << "Sound: Warning: Couldn't get number of processed buffers: " << getALErrorString(error) << std::endl;
+                COUT(2) << "Sound: Warning: Couldn't get number of processed buffers: " << getALErrorString(error) << std::endl;
 
+            COUT(2) << "Sound: Blub: " << processed << std::endl;
             if(processed > 0)
             {
+                COUT(4) << "Sound: " << processed << std::endl;
                 ALuint* buffers = new ALuint[processed];
                 alSourceUnqueueBuffers(audioSource, processed, buffers);
@@ -119,5 +130,5 @@
                     if (ret == 0)
                     {
-                        return;
+                        break;
                     }
                     else if (ret < 0)
@@ -129,10 +140,20 @@
 
                     alBufferData(buffers[i], format, &inbuffer, ret, vorbisInfo->rate);
-                    alGetError();
+                    if(ALint error = alGetError()) {
+                        COUT(2) << "Sound: Could not fill buffer: " << getALErrorString(error) << std::endl;
+                        break;
+                    }
+                    alSourceQueueBuffers(audioSource, 1, &buffers[i]);
+                    if (ALint error = alGetError()) {
+                        COUT(2) << "Sound: Warning: Couldn't queue buffers: " << getALErrorString(error) << std::endl;
+                    }
                 }
-
-                alSourceQueueBuffers(audioSource, processed, buffers);
-                if (ALint error = alGetError())
-                    COUT(2) << "Sound: Warning: Couldn't queue buffers: " << getALErrorString(error) << std::endl;
+            }
+            try {
+                boost::this_thread::interruption_point();
+            }
+            catch(boost::thread_interrupted) {
+                COUT(4) << "Sound: Catched interruption. Terminating thread for " << dataStream->getName() << std::endl;
+                return;
             }
             msleep(100); // perhaps another value here is better
