mail[Wesnoth-commits] r24709 - in /trunk/src: soundsource.cpp soundsource.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by grywacz on March 16, 2008 - 16:02:
Author: grzywacz
Date: Sun Mar 16 16:02:39 2008
New Revision: 24709

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24709&view=rev
Log:
Stop sound when sound source is removed.

Modified:
    trunk/src/soundsource.cpp
    trunk/src/soundsource.hpp

Modified: trunk/src/soundsource.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/soundsource.cpp?rev=24709&r1=24708&r2=24709&view=diff
==============================================================================
--- trunk/src/soundsource.cpp (original)
+++ trunk/src/soundsource.cpp Sun Mar 16 16:02:39 2008
@@ -110,6 +110,11 @@
        assert(_faderange > 0);
 }
 
+positional_source::~positional_source()
+{
+       sound::reposition_sound(_id, DISTANCE_SILENT);
+}
+
 void positional_source::update(unsigned int time, const display &disp)
 {
        if(time - _last_played < _min_delay || sound::is_sound_playing(_id))

Modified: trunk/src/soundsource.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/soundsource.hpp?rev=24709&r1=24708&r2=24709&view=diff
==============================================================================
--- trunk/src/soundsource.hpp (original)
+++ trunk/src/soundsource.hpp Sun Mar 16 16:02:39 2008
@@ -58,6 +58,7 @@
        // sound every second after the delay has passed or once the source
        // becomes visible
        positional_source(const sourcespec &spec);
+       ~positional_source();
 
        void update(unsigned int time, const display &disp);
        void update_positions(unsigned int time, const display &disp);




Related Messages


Powered by MHonArc, Updated Sun Mar 16 16:40:57 2008