]> git.tdb.fi Git - libs/al.git/blobdiff - source/soundscape.cpp
Drop copyright notices and Id tags from source files
[libs/al.git] / source / soundscape.cpp
index 694c8842231f30e5b077e0de42eac82c3da0af31..e12f39befacded7c6fe2809100e012e5e91e77dc 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspal
-Copyright © 2008 Mikko Rasa, Mikkosoft Productions
-Diestributed under the LGPL
-*/
-
 #include "source.h"
 #include "soundscape.h"
 
@@ -19,19 +12,19 @@ SoundScape::~SoundScape()
                delete *i;
 }
 
-void SoundScape::add_source(Source *src)
+void SoundScape::add_source(Source &src)
 {
-       sources.push_back(src);
+       sources.push_back(&src);
 }
 
-Source *SoundScape::play(const Buffer &buf, float x, float y, float z)
+Source &SoundScape::play(const Buffer &buf, float x, float y, float z)
 {
-       Source *src=new Source;
-       add_source(src);
+       Source *src = new Source;
+       add_source(*src);
        src->set_buffer(buf);
        src->set_position(x, y, z);
        src->play();
-       return src;
+       return *src;
 }
 
 void SoundScape::tick()
@@ -41,7 +34,7 @@ void SoundScape::tick()
                if((*i)->get_state()==STOPPED)
                {
                        delete *i;
-                       i=sources.erase(i);
+                       i = sources.erase(i);
                }
                else
                        ++i;