2 #include "soundscape.h"
9 SoundScape::SoundScape():
13 SoundScape::~SoundScape()
15 for(list<Source *>::iterator i=sources.begin(); i!=sources.end(); ++i)
19 void SoundScape::set_gain(float g)
22 for(list<Source *>::iterator i=sources.begin(); i!=sources.end(); ++i)
26 void SoundScape::add_source(Source &src)
28 sources.push_back(&src);
31 Source &SoundScape::play(const Buffer &buf, float x, float y, float z)
33 Source *src = new Source;
36 src->set_position(x, y, z);
42 void SoundScape::tick()
44 for(list<Source *>::iterator i=sources.begin(); i!=sources.end();)
46 if((*i)->get_state()==STOPPED)