diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
index 883045a01a..d093224b3c 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
});
}
+ public void SetSoundQueueing(UUID objectID, bool shouldQueue)
+ {
+ SceneObjectPart part;
+ if (!m_scene.TryGetSceneObjectPart(objectID, out part))
+ return;
+
+ part.SoundQueueing = shouldQueue;
+ }
+
#endregion
}
}
diff --git a/OpenSim/Region/Framework/Interfaces/ISoundModule.cs b/OpenSim/Region/Framework/Interfaces/ISoundModule.cs
index 68af4923d5..8372ddddf8 100644
--- a/OpenSim/Region/Framework/Interfaces/ISoundModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISoundModule.cs
@@ -104,7 +104,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// Sound asset ID
/// Sound volume
/// Triggered or not.
- ///
/// Sound radius
/// Play using sound master
/// Play as sound master
@@ -123,5 +122,12 @@ namespace OpenSim.Region.Framework.Interfaces
/// AABB top north-east corner
void TriggerSoundLimited(UUID objectID, UUID sound, double volume,
Vector3 min, Vector3 max);
+
+ ///
+ /// Set whether sounds on the given prim should be queued.
+ ///
+ ///
+ ///
+ void SetSoundQueueing(UUID objectID, bool shouldQueue);
}
}
\ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 347a2b57e3..b1c1cbb3ea 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -219,6 +219,14 @@ namespace OpenSim.Region.Framework.Scenes
public double SoundRadius;
+ ///
+ /// Should sounds played from this prim be queued?
+ ///
+ ///
+ /// This should only be changed by sound modules. It is up to sound modules as to how they interpret this setting.
+ ///
+ public bool SoundQueueing { get; set; }
+
public uint TimeStampFull;
public uint TimeStampLastActivity; // Will be used for AutoReturn
@@ -2429,7 +2437,7 @@ namespace OpenSim.Region.Framework.Scenes
if (soundModule != null)
{
soundModule.SendSound(UUID, CollisionSound,
- CollisionSoundVolume, true, (byte)0, 0, false,
+ CollisionSoundVolume, true, 0, 0, false,
false);
}
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 969243c8ae..0b4b0431a2 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
// send the sound, once, to all clients in range
if (m_SoundModule != null)
{
- m_SoundModule.SendSound(m_host.UUID,
- ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume, false, 0,
- 0, false, false);
+ m_SoundModule.SendSound(
+ m_host.UUID,
+ ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound),
+ volume, false, m_host.SoundQueueing ? (byte)SoundFlags.Queue : (byte)SoundFlags.None,
+ 0, false, false);
}
}
@@ -11822,7 +11824,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llSetSoundQueueing(int queue)
{
m_host.AddScriptLPS(1);
- NotImplemented("llSetSoundQueueing");
+
+ if (m_SoundModule != null)
+ m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value);
}
public void llCollisionSprite(string impact_sprite)