aboutsummaryrefslogtreecommitdiff
path: root/src/sound_openal.cpp
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-04-18 20:00:16 +0200
committerWeblate <42@minetest.ru>2013-04-18 20:00:16 +0200
commit9e6376bd95ba9309365b39b878ab2f499776437a (patch)
treea354a250daedf036cc36e33d3d1ebb9fafc4ac27 /src/sound_openal.cpp
parente385af7cc01d156164b85d10b00a7047a5372e66 (diff)
parente60eb32050a44d344795e4a1515a56038bb97e02 (diff)
downloadminetest-9e6376bd95ba9309365b39b878ab2f499776437a.tar.gz
minetest-9e6376bd95ba9309365b39b878ab2f499776437a.tar.bz2
minetest-9e6376bd95ba9309365b39b878ab2f499776437a.zip
Merge remote branch 'origin/master'
Diffstat (limited to 'src/sound_openal.cpp')
-rw-r--r--src/sound_openal.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sound_openal.cpp b/src/sound_openal.cpp
index cc5261eae..0cfbc2798 100644
--- a/src/sound_openal.cpp
+++ b/src/sound_openal.cpp
@@ -271,6 +271,16 @@ public:
m_context = NULL;
alcCloseDevice(m_device);
m_device = NULL;
+
+ for (std::map<std::string, std::vector<SoundBuffer*> >::iterator i = m_buffers.begin();
+ i != m_buffers.end(); i++) {
+ for (std::vector<SoundBuffer*>::iterator iter = (*i).second.begin();
+ iter != (*i).second.end(); iter++) {
+ delete *iter;
+ }
+ (*i).second.clear();
+ }
+ m_buffers.clear();
infostream<<"Audio: Deinitialized."<<std::endl;
}