diff options
author | Justin Clark-Casey (justincc) | 2013-05-22 20:01:57 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-05-22 20:01:57 +0100 |
commit | 7d38f4940c39b217bcf6b90b7811933099916de9 (patch) | |
tree | 75c5a6ef2b670e464cec98d94580f06fd86c38c2 | |
parent | Revert "BulletSim: add code to experimentally use asset hull data." (diff) | |
download | opensim-SC_OLD-7d38f4940c39b217bcf6b90b7811933099916de9.zip opensim-SC_OLD-7d38f4940c39b217bcf6b90b7811933099916de9.tar.gz opensim-SC_OLD-7d38f4940c39b217bcf6b90b7811933099916de9.tar.bz2 opensim-SC_OLD-7d38f4940c39b217bcf6b90b7811933099916de9.tar.xz |
Implement llSetSoundQueueing().
This is controlled by the viewer, not the server.
So as per http://wiki.secondlife.com/wiki/LlSetSoundQueueing, only two sounds can be queued per prim.
You probably need to use llPreloadSound() for best results
4 files changed, 33 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 883045a..d093224 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -369,6 +369,15 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
369 | }); | 369 | }); |
370 | } | 370 | } |
371 | 371 | ||
372 | public void SetSoundQueueing(UUID objectID, bool shouldQueue) | ||
373 | { | ||
374 | SceneObjectPart part; | ||
375 | if (!m_scene.TryGetSceneObjectPart(objectID, out part)) | ||
376 | return; | ||
377 | |||
378 | part.SoundQueueing = shouldQueue; | ||
379 | } | ||
380 | |||
372 | #endregion | 381 | #endregion |
373 | } | 382 | } |
374 | } | 383 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/ISoundModule.cs b/OpenSim/Region/Framework/Interfaces/ISoundModule.cs index 68af492..8372ddd 100644 --- a/OpenSim/Region/Framework/Interfaces/ISoundModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ISoundModule.cs | |||
@@ -104,7 +104,6 @@ namespace OpenSim.Region.Framework.Interfaces | |||
104 | /// <param name="sound">Sound asset ID</param> | 104 | /// <param name="sound">Sound asset ID</param> |
105 | /// <param name="volume">Sound volume</param> | 105 | /// <param name="volume">Sound volume</param> |
106 | /// <param name="triggered">Triggered or not.</param> | 106 | /// <param name="triggered">Triggered or not.</param> |
107 | /// <param name="flags"></param> | ||
108 | /// <param name="radius">Sound radius</param> | 107 | /// <param name="radius">Sound radius</param> |
109 | /// <param name="useMaster">Play using sound master</param> | 108 | /// <param name="useMaster">Play using sound master</param> |
110 | /// <param name="isMaster">Play as sound master</param> | 109 | /// <param name="isMaster">Play as sound master</param> |
@@ -123,5 +122,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
123 | /// <param name="max">AABB top north-east corner</param> | 122 | /// <param name="max">AABB top north-east corner</param> |
124 | void TriggerSoundLimited(UUID objectID, UUID sound, double volume, | 123 | void TriggerSoundLimited(UUID objectID, UUID sound, double volume, |
125 | Vector3 min, Vector3 max); | 124 | Vector3 min, Vector3 max); |
125 | |||
126 | /// <summary> | ||
127 | /// Set whether sounds on the given prim should be queued. | ||
128 | /// </summary> | ||
129 | /// <param name='objectID'></param> | ||
130 | /// <param name='shouldQueue'></param> | ||
131 | void SetSoundQueueing(UUID objectID, bool shouldQueue); | ||
126 | } | 132 | } |
127 | } \ No newline at end of file | 133 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 347a2b5..b1c1cbb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -219,6 +219,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
219 | 219 | ||
220 | public double SoundRadius; | 220 | public double SoundRadius; |
221 | 221 | ||
222 | /// <summary> | ||
223 | /// Should sounds played from this prim be queued? | ||
224 | /// </summary> | ||
225 | /// <remarks> | ||
226 | /// This should only be changed by sound modules. It is up to sound modules as to how they interpret this setting. | ||
227 | /// </remarks> | ||
228 | public bool SoundQueueing { get; set; } | ||
229 | |||
222 | public uint TimeStampFull; | 230 | public uint TimeStampFull; |
223 | 231 | ||
224 | public uint TimeStampLastActivity; // Will be used for AutoReturn | 232 | public uint TimeStampLastActivity; // Will be used for AutoReturn |
@@ -2429,7 +2437,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2429 | if (soundModule != null) | 2437 | if (soundModule != null) |
2430 | { | 2438 | { |
2431 | soundModule.SendSound(UUID, CollisionSound, | 2439 | soundModule.SendSound(UUID, CollisionSound, |
2432 | CollisionSoundVolume, true, (byte)0, 0, false, | 2440 | CollisionSoundVolume, true, 0, 0, false, |
2433 | false); | 2441 | false); |
2434 | } | 2442 | } |
2435 | } | 2443 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 969243c..0b4b043 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2474,9 +2474,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2474 | // send the sound, once, to all clients in range | 2474 | // send the sound, once, to all clients in range |
2475 | if (m_SoundModule != null) | 2475 | if (m_SoundModule != null) |
2476 | { | 2476 | { |
2477 | m_SoundModule.SendSound(m_host.UUID, | 2477 | m_SoundModule.SendSound( |
2478 | ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume, false, 0, | 2478 | m_host.UUID, |
2479 | 0, false, false); | 2479 | ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), |
2480 | volume, false, m_host.SoundQueueing ? (byte)SoundFlags.Queue : (byte)SoundFlags.None, | ||
2481 | 0, false, false); | ||
2480 | } | 2482 | } |
2481 | } | 2483 | } |
2482 | 2484 | ||
@@ -11822,7 +11824,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11822 | public void llSetSoundQueueing(int queue) | 11824 | public void llSetSoundQueueing(int queue) |
11823 | { | 11825 | { |
11824 | m_host.AddScriptLPS(1); | 11826 | m_host.AddScriptLPS(1); |
11825 | NotImplemented("llSetSoundQueueing"); | 11827 | |
11828 | if (m_SoundModule != null) | ||
11829 | m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); | ||
11826 | } | 11830 | } |
11827 | 11831 | ||
11828 | public void llCollisionSprite(string impact_sprite) | 11832 | public void llCollisionSprite(string impact_sprite) |