コード例 #1
0
ファイル: SoundManager.cs プロジェクト: scatterp/plexview
        ///<summary>Raises the SoundTrigger Event</summary>
        /// <param name="e">A SoundTriggerEventArgs object containing
        /// the data sent from the simulator</param>
        protected virtual void OnSoundTrigger(SoundTriggerEventArgs e)
        {
            EventHandler <SoundTriggerEventArgs> handler = m_SoundTrigger;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
ファイル: MediaManager.cs プロジェクト: mixixi/radegast
        /// <summary>
        /// Handle request to play a sound, which might (or mioght not) have been preloaded.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Sound_SoundTrigger(object sender, SoundTriggerEventArgs e)
        {
            if (e.SoundID == UUID.Zero) return;

            Logger.Log("Trigger sound " + e.SoundID.ToString() +
                " in object " + e.ObjectID.ToString(),
                Helpers.LogLevel.Debug);

            new BufferSound(
                e.ObjectID,
                e.SoundID,
                false,
                true,
                e.Position,
                e.Gain * ObjectVolume);
        }
コード例 #3
0
ファイル: SoundManager.cs プロジェクト: VirtualReality/LibOMV
 ///<summary>Raises the SoundTrigger Event</summary>
 /// <param name="e">A SoundTriggerEventArgs object containing
 /// the data sent from the simulator</param>
 protected virtual void OnSoundTrigger(SoundTriggerEventArgs e)
 {
     EventHandler<SoundTriggerEventArgs> handler = m_SoundTrigger;
     if (handler != null)
         handler(this, e);
 }
コード例 #4
0
        ///<summary>Raises the SoundTrigger Event</summary>
        /// <param name="e">A SoundTriggerEventArgs object containing
        /// the data sent from the simulator</param>
        protected virtual void OnSoundTrigger(SoundTriggerEventArgs e)
        {
            EventHandler <SoundTriggerEventArgs> handler = m_SoundTrigger;

            handler?.Invoke(this, e);
        }
コード例 #5
0
ファイル: WorldEffects.cs プロジェクト: drzo/opensim4opencog
        public override void Sound_OnSoundTrigger(object sender, SoundTriggerEventArgs e)
        {
            if (!MaintainSounds) return;
            var soundID = e.SoundID;
            var gain = e.Gain;
            var objectID = e.ObjectID;
            var ownerID = e.OwnerID;
            var parentID = e.ParentID;
            var position = e.Position;
            var p = GetRegion(e.RegionHandle).LocalToGlobal(position);
            EnqueueRequestAsset(soundID, AssetType.Sound, true);

                EventQueue.Enqueue(() =>
                {
                    if (objectID != UUID.Zero) OnObjectSound(objectID, soundID, gain);
                    else
                    {
                        SendNewRegionEvent(SimEventType.EFFECT, "On-Sound-Position-Trigger", soundID,
                                           ownerID, parentID, gain, p);
                    }
                });
        }
コード例 #6
0
ファイル: AllEvents.cs プロジェクト: drzo/opensim4opencog
 public virtual void Sound_OnSoundTrigger(object sender, SoundTriggerEventArgs e) { OnEvent("On-Sound-Trigger", paramNamesOnSoundTrigger, paramTypesOnSoundTrigger, e); }