mirror of
https://github.com/minetest/minetest.git
synced 2024-12-28 08:57:30 +01:00
OpenAL: Free buffers on quit
This commit is contained in:
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();
|
||||
|
Loading…
Reference in New Issue
Block a user