]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/sample_group.hxx
Fix a pause situation where more code was executed than expected. Unbind an OpenAL...
[simgear.git] / simgear / sound / sample_group.hxx
index e98596c36f99de06f9c193e8988cfeaf04998ec7..7a3dff70be25ae0be6baa9a023d7c6eb073076f6 100644 (file)
 
 #if defined(__APPLE__)
 # include <OpenAL/al.h>
-#elif defined(_WIN32)
+#elif defined(OPENALSDK)
 # include <al.h>
 #else
 # include <AL/al.h>
 #endif
 
 #include <string>
+#include <vector>
 #include <map>
 
 #include <simgear/compiler.h>
@@ -55,7 +56,8 @@
 using std::map;
 using std::string;
 
-typedef map < string, SGSharedPtr<SGSoundSample> > sample_map;
+typedef SGSharedPtr<SGSoundSample> SGSoundSample_ptr;
+typedef map < string, SGSoundSample_ptr > sample_map;
 typedef sample_map::iterator sample_map_iterator;
 typedef sample_map::const_iterator const_sample_map_iterator;
 
@@ -214,6 +216,7 @@ protected:
     bool _active;
 
 private:
+    bool _pause;
     float _volume;
     bool _tied_to_listener;
 
@@ -222,6 +225,7 @@ private:
     SGGeod _position;
 
     sample_map _samples;
+    std::vector<SGSoundSample_ptr> _removed_samples;
 
     bool testForALError(string s);
     bool testForError(void *p, string s);