From 29a8ae48b51de55a02f839b6e4566054ad3f7f58 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 6 Oct 2012 22:23:14 +0100 Subject: transposing LoopSoundMaster to Sound Module --- .../Shared/Api/Implementation/LSL_Api.cs | 28 +++------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 61fd1aa..2669add 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2397,33 +2397,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoopSoundMaster(string sound, double volume) { m_host.AddScriptLPS(1); - m_host.ParentGroup.LoopSoundMasterPrim = m_host; - lock (m_host.ParentGroup.LoopSoundSlavePrims) + if (m_SoundModule != null) { - foreach (SceneObjectPart prim in m_host.ParentGroup.LoopSoundSlavePrims) - { - if (prim.Sound != UUID.Zero) - llStopSound(); - - prim.Sound = KeyOrName(sound); - prim.SoundGain = volume; - prim.SoundFlags = 1; // looping - prim.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable? - - prim.ScheduleFullUpdate(); - prim.SendFullUpdateToAllClients(); - } + m_SoundModule.LoopSoundMaster(m_host.UUID, KeyOrName(sound), + volume, 20); } - if (m_host.Sound != UUID.Zero) - llStopSound(); - - m_host.Sound = KeyOrName(sound); - m_host.SoundGain = volume; - m_host.SoundFlags = 1; // looping - m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable? - - m_host.ScheduleFullUpdate(); - m_host.SendFullUpdateToAllClients(); } public void llLoopSoundSlave(string sound, double volume) -- cgit v1.1