OpenAL: Free buffers on quit

This commit is contained in:
SmallJoker 2021-08-03 20:26:00 +02:00
parent bee50ca7fa
commit 4a3728d828

@ -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();