Inheritance: AudioSourceEventArgs
Exemplo n.º 1
0
        private void OnReceivedAudio(object sender, ReceivedAudioEventArgs e)
        {
            if (this.playbackMuted)
            {
                return;
            }

            AudioPlaybackEntity entity;

            lock (playbacks) {
                if (!playbacks.TryGetValue(e.Source, out entity) || entity.Muted)
                {
                    return;
                }
            }

            for (int i = 0; i < e.AudioData.Length; ++i)
            {
                lock (playbacks) {
                    if (!entity.Muted)
                    {
                        entity.AudioPlayback.QueuePlayback(e.Source, e.AudioData[i]);
                    }
                }
            }
        }
Exemplo n.º 2
0
 protected virtual void OnReceivedAudio(ReceivedAudioEventArgs e)
 {
     var received = this.ReceivedAudio;
     if (received != null)
         received (this, e);
 }
Exemplo n.º 3
0
        private void OnReceivedAudio(object sender, ReceivedAudioEventArgs e)
        {
            if (this.playbackMuted)
                return;

            AudioPlaybackEntity entity;
            lock (playbacks) {
                if (!playbacks.TryGetValue (e.Source, out entity) || entity.Muted)
                    return;
            }

            for (int i = 0; i < e.AudioData.Length; ++i) {
                lock (playbacks) {
                    if (!entity.Muted)
                        entity.AudioPlayback.QueuePlayback (e.Source, e.AudioData[i]);
                }
            }
        }
Exemplo n.º 4
0
        private void OnReceivedAudio(object sender, ReceivedAudioEventArgs e)
        {
            if (!UserTalkingCounts && e.Source.Id > 0 && e.Source.OwnerId == context.CurrentUser.UserId)
                return;

            AddTalker (e.Source);
        }