summaryrefslogtreecommitdiff
path: root/indra/llaudio/llaudioengine.cpp
diff options
context:
space:
mode:
authorAnsariel Hiller <Ansariel@users.noreply.github.com>2024-07-27 17:09:58 +0200
committerGitHub <noreply@github.com>2024-07-27 18:09:58 +0300
commit266553913f134755c021bf509cda55fb96a07e1a (patch)
tree24f159668003396f1ee217756a5a566f46dda986 /indra/llaudio/llaudioengine.cpp
parent42b1cedc85b52571f411af3e896e005bdf92657a (diff)
Fix running multiple viewer instances stealing sound from first instance (#2127)
Diffstat (limited to 'indra/llaudio/llaudioengine.cpp')
-rw-r--r--indra/llaudio/llaudioengine.cpp12
1 files changed, 11 insertions, 1 deletions
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;
}