From 7fea3a70fde843a7d2c938e1820fd2cacde9e2b6 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 30 Dec 2020 20:13:24 -0500
Subject: [PATCH] Avoid playing silent sounds. Thanks Chalice!

---
 indra/llaudio/llaudioengine.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 3419e86cc49..b19ca87c5be 100644
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -819,7 +819,8 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i
 	// Create a new source (since this can't be associated with an existing source.
 	//LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL;
 
-	if (mMuted)
+	// Do not load mutex or silent sounds.
+	if (mMuted || gain <FLT_EPSILON*2)
 	{
 		return;
 	}
-- 
GitLab