forked from Mirrorlandia_minetest/minetest
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