summaryrefslogtreecommitdiff
path: root/indra/llaudio
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-31 21:25:47 +0800
committerErik Kundiman <erik@megapahit.org>2024-09-01 20:43:42 +0800
commit95582654e49422d51b55665c3f2821c848ad1cb8 (patch)
treed6d03a887b8e1b6c3be1b139d63b1638c5d0fdcd /indra/llaudio
parentab3f483a3e5ed213882a83b882095cfdb6a4de57 (diff)
parentb0fefd62adbf51f32434ba077e9f52d8a9241d15 (diff)
Merge remote-tracking branch 'secondlife/release/2024.08-DeltaFPS' into 2024.08-DeltaFPS
Diffstat (limited to 'indra/llaudio')
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.cpp7
-rw-r--r--indra/llaudio/llaudioengine.cpp12
2 files changed, 16 insertions, 3 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index a46f9acc63..d8a6fffea6 100755
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -790,9 +790,12 @@ bool LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
{
- // Just put it on the decode queue.
+ // Just put it on the decode queue it if it's not already in the queue
LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " has local asset file already" << LL_ENDL;
- mImpl->mDecodeQueue.push_back(uuid);
+ if (std::find(mImpl->mDecodeQueue.begin(), mImpl->mDecodeQueue.end(), uuid) == mImpl->mDecodeQueue.end())
+ {
+ mImpl->mDecodeQueue.emplace_back(uuid);
+ }
return true;
}
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 3697422ac8..613c408157 100644
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -1827,7 +1827,17 @@ bool LLAudioData::load()
{
// Hrm. Right now, let's unset the buffer, since it's empty.
gAudiop->cleanupBuffer(mBufferp);
- mBufferp = NULL;
+ mBufferp = nullptr;
+
+ if (!gDirUtilp->fileExists(wav_path))
+ {
+ mHasLocalData = false;
+ mHasDecodedData = false;
+ mHasCompletedDecode = false;
+ mHasDecodeFailed = false;
+ mHasWAVLoadFailed = false;
+ gAudiop->preloadSound(mID);
+ }
return false;
}