From 266553913f134755c021bf509cda55fb96a07e1a Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Sat, 27 Jul 2024 17:09:58 +0200 Subject: Fix running multiple viewer instances stealing sound from first instance (#2127) --- indra/llaudio/llaudioengine.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/llaudio/llaudioengine.cpp') 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; } -- cgit v1.2.3