//-------------------------- void EncodedVoiceDelegate(BasicMumbleProtocol proto, byte[] data, uint userId, long sequence, MumbleSharp.Audio.Codecs.IVoiceCodec codec, MumbleSharp.Audio.SpeechTarget target) { User user = proto.Users.FirstOrDefault(u => u.Id == userId); AddPlayback(user); TreeNode <UserInfo> userNode = null; foreach (TreeNode <ChannelInfo> chanelNode in tvUsers.Nodes) { foreach (TreeNode <UserInfo> subNode in chanelNode.Nodes.OfType <TreeNode <UserInfo> >()) { if (subNode.Value.Id == user.Id) { userNode = (TreeNode <UserInfo>)subNode; } } if (userNode != null) { break; } } if (userNode != null) { tvUsers.AddNotifyingNode(userNode, " [SPEAK]", TimeSpan.FromMilliseconds(500)); } }
//-------------------------- void EncodedVoiceDelegate(BasicMumbleProtocol proto, byte[] data, uint userId, long sequence, MumbleSharp.Audio.Codecs.IVoiceCodec codec, MumbleSharp.Audio.SpeechTarget target) { User user = proto.Users.FirstOrDefault(u => u.Id == userId); TreeNode <UserInfo> userNode = null; foreach (TreeNode <ChannelInfo> chanelNode in tvUsers.Nodes) { foreach (TreeNode <UserInfo> subNode in chanelNode.Nodes) { if (subNode.Value.Id == user.Id) { userNode = subNode; } } if (userNode != null) { break; } } if (userNode != null) { //userNode.BeginInvoke((MethodInvoker)(() => // { // userNode.Text = user.Name + " [SPEAK]"; // })); } }