]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/soundmgr.cxx
This is step "1" of probably "many" in the process of separating out the
[flightgear.git] / src / Sound / soundmgr.cxx
index 94e3099a1db6258fffda4142e583d1009cfe2dce..b303a11cdcfe8acf06b38fd16d24df29969c31d7 100644 (file)
@@ -140,6 +140,7 @@ FGSoundMgr::~FGSoundMgr() {
         FGSimpleSound *s = sound_current->second;
 
         audio_sched->stopSample(s->get_sample());
+        delete s->get_sample();
         delete s;
     }
 
@@ -163,6 +164,8 @@ void FGSoundMgr::init() {
     sample_map_iterator sample_end = samples.end();
     for ( ; sample_current != sample_end; ++sample_current ) {
         sample_ref *sr = sample_current->second;
+
+        audio_sched->stopSample(sr->sample);
         delete sr->sample;
         delete sr;
     }
@@ -175,6 +178,8 @@ void FGSoundMgr::init() {
     sound_map_iterator sound_end = sounds.end();
     for ( ; sound_current != sound_end; ++sound_current ) {
        FGSimpleSound *s = sound_current->second;
+
+        audio_sched->stopSample(s->get_sample());
        delete s->get_sample();
        delete s;
     }
@@ -182,11 +187,13 @@ void FGSoundMgr::init() {
 
 }
 
+
 void FGSoundMgr::bind ()
 {
   // no properties yet
 }
 
+
 void FGSoundMgr::unbind ()
 {
   // no properties yet