summaryrefslogtreecommitdiff
path: root/indra/llaudio/llaudioengine_openal.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@lindenlab.com>2024-09-28 22:15:46 -0400
committerGitHub <noreply@github.com>2024-09-28 22:15:46 -0400
commit4a941ed4a4045fb1099c163b485c5d2a5bd08688 (patch)
tree03dacdbca8a199625780e3ec54beaf42b8de9454 /indra/llaudio/llaudioengine_openal.cpp
parentd511ff7365284a4475b1d729cf3448d378c83341 (diff)
parentef92cd3470d1b6198c334faf195761b8ce9d7add (diff)
Merge pull request #2725 from RyeMutt/openal-crash
Fix shutdown crash from OpenAL failing to release a buffer
Diffstat (limited to 'indra/llaudio/llaudioengine_openal.cpp')
-rw-r--r--indra/llaudio/llaudioengine_openal.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp
index 18d682b554..755547bfaa 100644
--- a/indra/llaudio/llaudioengine_openal.cpp
+++ b/indra/llaudio/llaudioengine_openal.cpp
@@ -79,7 +79,7 @@ bool LLAudioEngine_OpenAL::init(void* userdata, const std::string &app_title)
ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext());
alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major);
- alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor);
+ alcGetIntegerv(device, ALC_MINOR_VERSION, 1, &minor);
LL_INFOS() << "ALC version: " << major << "." << minor << LL_ENDL;
LL_INFOS() << "ALC default device: "
@@ -190,6 +190,8 @@ LLAudioChannelOpenAL::~LLAudioChannelOpenAL()
void LLAudioChannelOpenAL::cleanup()
{
alSourceStop(mALSource);
+ alSourcei(mALSource, AL_BUFFER, AL_NONE);
+
mCurrentBufferp = NULL;
}