]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.cxx
Add missing include files needed by the new math code under windows
[simgear.git] / simgear / sound / soundmgr_openal.cxx
index 534c4430e4cb348c68866c15fcc6a0c0d1e71ab2..82971d300a4d94aa87c80c4316ff6fa334c64070 100644 (file)
 //
 // $Id$
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include <simgear/compiler.h>
 
 #if defined(__APPLE__)
@@ -141,15 +145,6 @@ SGSoundMgr::~SGSoundMgr() {
     if (context)
         alcDestroyContext( context );
 #endif
-    //
-    // Remove the samples from the sample manager.
-    //
-    sample_map_iterator sample_current = samples.begin();
-    sample_map_iterator sample_end = samples.end();
-    for ( ; sample_current != sample_end; ++sample_current ) {
-       SGSoundSample *sample = sample_current->second;
-       delete sample;
-    }
 }
 
 
@@ -158,12 +153,6 @@ void SGSoundMgr::init() {
     //
     // Remove the samples from the sample manager.
     //
-    sample_map_iterator sample_current = samples.begin();
-    sample_map_iterator sample_end = samples.end();
-    for ( ; sample_current != sample_end; ++sample_current ) {
-        SGSoundSample *sample = sample_current->second;
-        delete sample;
-    }
     samples.clear();
 }
 
@@ -233,8 +222,6 @@ bool SGSoundMgr::remove( const string &refname ) {
     if ( sample_it != samples.end() ) {
        // first stop the sound from playing (so we don't bomb the
        // audio scheduler)
-       SGSoundSample *sample = sample_it->second;
-        delete sample;
         samples.erase( sample_it );
 
         // cout << "sndmgr: removed -> " << refname << endl;