mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +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 (auto &buffer : m_buffers) {
|
||||||
for (SoundBuffer *sb : buffer.second) {
|
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;
|
delete sb;
|
||||||
}
|
}
|
||||||
buffer.second.clear();
|
buffer.second.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user