summaryrefslogtreecommitdiff
path: root/indra/llaudio
diff options
context:
space:
mode:
authorMike <contact@mikelittman.me>2026-10-22 12:20:17 -0400
committerGitHub <noreply@github.com>2026-10-23 00:20:17 +0800
commit5b52af0bf830de6732bc587f5932c0209f6c337a (patch)
treeb9708b676d7d790951391abc24d289955834cc2e /indra/llaudio
parent32721d1421819fcd8ca0776421e147d59dad60ab (diff)
Fix remaining Apple audio, depth, and speaking-indicator crashes (#39)
Stop the OpenAL wind path from spinning when unqueue fails. Allocate Apple depth buffers with the unsized format and skip deferred lighting when that allocation left the target empty. Remove every registration of a speaking indicator, including a null one.
Diffstat (limited to 'indra/llaudio')
-rw-r--r--indra/llaudio/llaudioengine_openal.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp
index 4126c8ef80..b65e9c518f 100644
--- a/indra/llaudio/llaudioengine_openal.cpp
+++ b/indra/llaudio/llaudioengine_openal.cpp
@@ -500,6 +500,7 @@ bool LLAudioEngine_OpenAL::initWind()
if((error=alGetError()) != AL_NO_ERROR)
{
LL_WARNS() << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<LL_ENDL;
+ mWindSource = AL_NONE;
}
mWindGen = new LLWindGen<WIND_SAMPLE_T>;
@@ -564,6 +565,9 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
if(!mWindBuf)
return;
+ if (mWindSource == AL_NONE)
+ return;
+
if (mWindUpdateTimer.checkExpirationAndReset(LL_WIND_UPDATE_INTERVAL))
{
@@ -589,7 +593,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
// ok lets make a wind buffer now
- ALint processed, queued, unprocessed;
+ ALint processed = 0, queued = 0, unprocessed = 0;
alGetSourcei(mWindSource, AL_BUFFERS_PROCESSED, &processed);
alGetSourcei(mWindSource, AL_BUFFERS_QUEUED, &queued);
unprocessed = queued - processed;
@@ -601,7 +605,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
//LL_INFOS() << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << LL_ENDL;
- while(processed--) // unqueue old buffers
+ while (processed > 0) // unqueue old buffers
{
ALuint buffer;
ALenum error;
@@ -610,12 +614,11 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
error = alGetError();
if(error != AL_NO_ERROR)
{
- LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << LL_ENDL;
- }
- else
- {
- alDeleteBuffers(1, &buffer);
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers: " << error << LL_ENDL;
+ break;
}
+ alDeleteBuffers(1, &buffer);
+ --processed;
}
unprocessed += mNumEmptyWindALBuffers;