aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorSignpostMarv2012-10-06 22:23:14 +0100
committerJustin Clark-Casey (justincc)2012-10-29 23:38:59 +0000
commit29a8ae48b51de55a02f839b6e4566054ad3f7f58 (patch)
treea9b27473da15d2aa16102322fcfe7f0d42bacb9d /OpenSim/Region/ScriptEngine
parenttransposing preload sound onto sound module (diff)
downloadopensim-SC_OLD-29a8ae48b51de55a02f839b6e4566054ad3f7f58.zip
opensim-SC_OLD-29a8ae48b51de55a02f839b6e4566054ad3f7f58.tar.gz
opensim-SC_OLD-29a8ae48b51de55a02f839b6e4566054ad3f7f58.tar.bz2
opensim-SC_OLD-29a8ae48b51de55a02f839b6e4566054ad3f7f58.tar.xz
transposing LoopSoundMaster to Sound Module
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs28
1 files changed, 3 insertions, 25 deletions
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
2397 public void llLoopSoundMaster(string sound, double volume) 2397 public void llLoopSoundMaster(string sound, double volume)
2398 { 2398 {
2399 m_host.AddScriptLPS(1); 2399 m_host.AddScriptLPS(1);
2400 m_host.ParentGroup.LoopSoundMasterPrim = m_host; 2400 if (m_SoundModule != null)
2401 lock (m_host.ParentGroup.LoopSoundSlavePrims)
2402 { 2401 {
2403 foreach (SceneObjectPart prim in m_host.ParentGroup.LoopSoundSlavePrims) 2402 m_SoundModule.LoopSoundMaster(m_host.UUID, KeyOrName(sound),
2404 { 2403 volume, 20);
2405 if (prim.Sound != UUID.Zero)
2406 llStopSound();
2407
2408 prim.Sound = KeyOrName(sound);
2409 prim.SoundGain = volume;
2410 prim.SoundFlags = 1; // looping
2411 prim.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
2412
2413 prim.ScheduleFullUpdate();
2414 prim.SendFullUpdateToAllClients();
2415 }
2416 } 2404 }
2417 if (m_host.Sound != UUID.Zero)
2418 llStopSound();
2419
2420 m_host.Sound = KeyOrName(sound);
2421 m_host.SoundGain = volume;
2422 m_host.SoundFlags = 1; // looping
2423 m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
2424
2425 m_host.ScheduleFullUpdate();
2426 m_host.SendFullUpdateToAllClients();
2427 } 2405 }
2428 2406
2429 public void llLoopSoundSlave(string sound, double volume) 2407 public void llLoopSoundSlave(string sound, double volume)