OpenMetaverse Protocol Library Developers API Documentation
SoundTriggerEventArgs Class
NamespacesOpenMetaverseSoundTriggerEventArgs
Provides data for the SoundTriggerevent
Declaration Syntax
C#
public
class
SoundTriggerEventArgs :
EventArgs
Members
All Members Constructors Properties



Icon Member Description
SoundTriggerEventArgs(Simulator, UUID, UUID, UUID, UUID, Single, UInt64, Vector3)
Construct a new instance of the SoundTriggerEventArgs class

Gain
Get the volume level

ObjectID
Get the ID of the Object

OwnerID
Get the ID of the owner

ParentID
Get the ID of the objects parent

Position
Get the source position

RegionHandle
Get the regionhandle

Simulator
Simulator where the event originated

SoundID
Get the sound asset id

Remarks

The SoundTriggerevent occurs when the simulator forwards a request made by yourself or another agent to play either an asset sound or a built in sound

Requests to play sounds where the SoundIDis not one of the built-in Soundswill require sending a request to download the sound asset before it can be played

Examples
The following code example uses the OwnerID, SoundIDand Gainproperties to display some information on a sound request on the Consolewindow.
  Copy imageCopy
// subscribe to the event
Client.Sound.SoundTrigger += Sound_SoundTrigger;

// play the pre-defined BELL_TING
sound
Client.Sound.SendSoundTrigger(Sounds.BELL_TING);

// handle the response data
private
void Sound_SoundTrigger(
object sender,
SoundTriggerEventArgs e)
{
    Console.WriteLine(
"{0} played the sound {1} at volume
{2}",
        e.OwnerID, e.SoundID, e.Gain);
}
Inheritance Hierarchy
Object
EventArgs
  SoundTriggerEventArgs

Assembly: OpenMetaverse(Module: OpenMetaverse.dll) Version: 0.9.3.3318 (0.9.3.3318)