Beispiel #1
0
        /// <summary>
        /// Event handler for the DirectPlay Voice PlayerStopped message
        /// </summary>
        public void PlayerStoppedHandler(object sender, Voice.PlayerStoppedEventArgs args)
        {
            m_NumPlayersTalking--;

            // If no players are talking, hide active playback icon
            if (m_NumPlayersTalking == 0)
            {
                m_Form.BeginInvoke(new AsyncCall(m_Form.ActivePlayIcon.Hide));
            }
        }
Beispiel #2
0
 private void PlayerStopped(object sender, Voice.PlayerStoppedEventArgs dpMessage)
 {
     lock (playerList)
     {
         for (int i = 0; i < playerList.Count; i++)
         {
             if (((VoicePlayer)playerList[i]).PlayerId == dpMessage.Message.SourcePlayerID)
             {
                 VoicePlayer oPlayer = (VoicePlayer)playerList[i];
                 oPlayer.Talking = false;
                 playerList[i]   = oPlayer;
                 break;
             }
         }
     }
     this.BeginInvoke(new BeginInvokeDelegate(this.UpdatePlayerList));
 }