aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/sound_openal.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/sound_openal.cpp b/src/client/sound_openal.cpp
index 8dceeede6..0eda8842b 100644
--- a/src/client/sound_openal.cpp
+++ b/src/client/sound_openal.cpp
@@ -362,6 +362,14 @@ public:
for (auto &buffer : m_buffers) {
for (SoundBuffer *sb : buffer.second) {
+ alDeleteBuffers(1, &sb->buffer_id);
+
+ ALenum error = alGetError();
+ if (error != AL_NO_ERROR) {
+ warningstream << "Audio: Failed to free stream for "
+ << buffer.first << ": " << alErrorString(error) << std::endl;
+ }
+
delete sb;
}
buffer.second.clear();