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 resultsuser_profiles
parent
6596a1de80
commit
7d38f4940c
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// <param name="sound">Sound asset ID</param>
|
||||
/// <param name="volume">Sound volume</param>
|
||||
/// <param name="triggered">Triggered or not.</param>
|
||||
/// <param name="flags"></param>
|
||||
/// <param name="radius">Sound radius</param>
|
||||
/// <param name="useMaster">Play using sound master</param>
|
||||
/// <param name="isMaster">Play as sound master</param>
|
||||
|
@ -123,5 +122,12 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// <param name="max">AABB top north-east corner</param>
|
||||
void TriggerSoundLimited(UUID objectID, UUID sound, double volume,
|
||||
Vector3 min, Vector3 max);
|
||||
|
||||
/// <summary>
|
||||
/// Set whether sounds on the given prim should be queued.
|
||||
/// </summary>
|
||||
/// <param name='objectID'></param>
|
||||
/// <param name='shouldQueue'></param>
|
||||
void SetSoundQueueing(UUID objectID, bool shouldQueue);
|
||||
}
|
||||
}
|
|
@ -219,6 +219,14 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public double SoundRadius;
|
||||
|
||||
/// <summary>
|
||||
/// Should sounds played from this prim be queued?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This should only be changed by sound modules. It is up to sound modules as to how they interpret this setting.
|
||||
/// </remarks>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue