From 625cc84ec0e281e5e68df0486c226ecf521dccde Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sun, 20 Mar 2022 19:29:41 +0200 Subject: SL-16865 llStopSound() does not stop sound if it is out of cutoff radius --- indra/llaudio/llaudioengine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/llaudio/llaudioengine.cpp') diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index d35f249973..e0ebbb76bd 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -1402,6 +1402,15 @@ bool LLAudioSource::setupChannel() return true; } +void LLAudioSource::stop() +{ + play(LLUUID::null); + if (mCurrentDatap) + { + // always reset data if something wants us to stop + mCurrentDatap = nullptr; + } +} bool LLAudioSource::play(const LLUUID &audio_uuid) { -- cgit v1.2.3