summaryrefslogtreecommitdiff
path: root/indra/llaudio/llaudioengine_openal.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-04-05 22:26:06 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-04-05 23:48:49 +0300
commit7dbdfda7d6fc94eda07dd8376fd47260dfd73964 (patch)
treee30cf373cb328a239cff6d77f1bb0c99c5d2e86f /indra/llaudio/llaudioengine_openal.cpp
parentd9d180aa00fa8b3616e77af5ab1acc50bcea3902 (diff)
SL-19585 Fix openal exit failure logging
Diffstat (limited to 'indra/llaudio/llaudioengine_openal.cpp')
-rw-r--r--indra/llaudio/llaudioengine_openal.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp
index 40d7988309..4a17b12532 100644
--- a/indra/llaudio/llaudioengine_openal.cpp
+++ b/indra/llaudio/llaudioengine_openal.cpp
@@ -135,10 +135,19 @@ void LLAudioEngine_OpenAL::shutdown()
LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL;
LLAudioEngine::shutdown();
+ // If a subsequent error occurs while there is still an error recorded
+ // internally, the second error will simply be ignored.
+ // Clear previous error to make sure we will captuare a valid failure reason
+ ALenum error = alutGetError();
+ if (error != ALUT_ERROR_NO_ERROR)
+ {
+ LL_WARNS() << "Uncleared error state prior to shutdown: "
+ << alutGetErrorString(error) << LL_ENDL;
+ }
+
LL_INFOS() << "About to alutExit()" << LL_ENDL;
if(!alutExit())
{
- LL_WARNS() << "Nuts." << LL_ENDL;
LL_WARNS() << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL;
}