Index: branches/avi_play/src/lib/sound/sound_engine.cc
===================================================================
--- branches/avi_play/src/lib/sound/sound_engine.cc	(revision 5845)
+++ branches/avi_play/src/lib/sound/sound_engine.cc	(revision 5924)
@@ -137,5 +137,5 @@
   if (this->sourceList != NULL)
   {
-    list<BaseObject*>::iterator source;
+    list<BaseObject*>::const_iterator source;
     for (source = this->sourceList->begin(); source != this->sourceList->end(); source++)
     {
@@ -182,5 +182,5 @@
   if (likely(this->sourceList != NULL))
   {
-    list<BaseObject*>::iterator sourceIT;
+    list<BaseObject*>::const_iterator sourceIT;
     SoundSource* source;
     for (sourceIT = this->sourceList->begin(); sourceIT != this->sourceList->end(); sourceIT++)
@@ -281,9 +281,13 @@
 
   // INITIALIZING THE DEVICE:
-  ALchar deviceName[] =
+#ifndef AL_VERSION_1_1
+  ALubyte deviceName[] =
+#else
+  ALCchar deviceName[] =
+#endif
 #ifdef __WIN32__
-      "native";
+      "Direct3D";
 #else
-      "'( ( devices '( native arts null ) ) )";
+      "'( ( devices '( native null ) ) )";
 #endif
   //
@@ -301,4 +305,36 @@
 }
 
+
+/**
+ * Allocates openAL sources
+ * @param count how many sources to allocate
+ * @returns true on success, false if at least one source could not be allocated
+ */
+bool SoundEngine::allocateSources(unsigned int count)
+{
+  ALuint* sourceList = new ALuint[count];
+  ALenum result;
+
+  alGenSources(count, sourceList);
+  if ((result = alGetError()) != AL_NO_ERROR)
+  {
+    SoundEngine::PrintALErrorString(result);
+    return false;
+  }
+
+  /// @TODO check syntax
+
+
+  // Setting default values.
+  for (int i = 0; i < count; i++)
+  {
+    alSourcef (sourceList[i], AL_PITCH,    1.0      );
+    alSourcef (sourceList[i], AL_GAIN,     this->getEffectsVolume() );
+    alSourcei (sourceList[i], AL_LOOPING,  AL_FALSE );
+    this->ALSources.push(sourceList[i]);
+  }
+  return true;
+}
+
 /**
  *  Transforms AL-errors into something readable
Index: branches/avi_play/src/lib/sound/sound_engine.h
===================================================================
--- branches/avi_play/src/lib/sound/sound_engine.h	(revision 5845)
+++ branches/avi_play/src/lib/sound/sound_engine.h	(revision 5924)
@@ -14,4 +14,5 @@
 
 #include <list>
+#include <stack>
 
 #define SOUND_DOPPLER_FACTOR       0.001          //!< A factor for the audible doppler effect
@@ -21,4 +22,5 @@
 class PNode;
 class IniParser;
+
 
 //! A class that handles audio via the openAudioLibrary
@@ -54,4 +56,6 @@
     void flushAllBuffers();
     void flushAllSources();
+
+    bool allocateSources(unsigned int count);
     bool initAudio();
 
@@ -66,17 +70,18 @@
 
   private:
-    static SoundEngine*      singletonRef;             //!< Reference to this class
+    static SoundEngine*            singletonRef;             //!< Reference to this class
 
-    ALCdevice*               device;                   //!< the used audio-device.
-    ALCcontext*              context;                  //!< the context, currently in use.
+    ALCdevice*                     device;                   //!< the used audio-device.
+    ALCcontext*                    context;                  //!< the context, currently in use.
 
-    float                    musicVolume;              //!< the maximum volume of the music in % (0f,1f]
-    float                    effectsVolume;            //!< the maximum volume of sound-effects in % (0f,1f]
-    PNode*                   listener;                 //!< The listener of the Scene
+    float                          musicVolume;              //!< the maximum volume of the music in % (0f,1f]
+    float                          effectsVolume;            //!< the maximum volume of sound-effects in % (0f,1f]
+    PNode*                         listener;                 //!< The listener of the Scene
 
-    std::list<BaseObject*>*  bufferList;               //!< A list of buffers
-    std::list<BaseObject*>*  sourceList;               //!< A list for all the sources in the scene.
+    const std::list<BaseObject*>*  bufferList;               //!< A list of buffers
+    const std::list<BaseObject*>*  sourceList;               //!< A list for all the sources in the scene.
 
-
+    unsigned int                   maxSourceCount;           //!< How many Sources is the Maximum
+    std::stack<ALuint>             ALSources;                //!< A list of real openAL-Sources, the engine allocates, and stores for reuse.
 };
 
Index: branches/avi_play/src/lib/sound/sound_source.cc
===================================================================
--- branches/avi_play/src/lib/sound/sound_source.cc	(revision 5845)
+++ branches/avi_play/src/lib/sound/sound_source.cc	(revision 5924)
@@ -18,4 +18,5 @@
 #include "sound_source.h"
 #include "sound_engine.h"
+
 #include "alincl.h"
 #include "compiler.h"
Index: branches/avi_play/src/lib/sound/sound_source.h
===================================================================
--- branches/avi_play/src/lib/sound/sound_source.h	(revision 5845)
+++ branches/avi_play/src/lib/sound/sound_source.h	(revision 5924)
@@ -39,4 +39,5 @@
 
   private:
+    bool                   bPlay;                 //!< If the Source is Playing.
     ALuint                 sourceID;              //!< The ID of the Source
     const SoundBuffer*     buffer;                //!< The buffer to play in this source.
