private void InCallForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (closingApp == true)
     {
         return;
     }
     closingApp         = true;
     Program.actualCall = null;
     Program.isInCall   = false;
     Program.spGlobal   = null;
     if (this.callId == null)
     {
         return;
     }
     packetsCounterTimer.Stop();
     tokenSource.Cancel();
     sp.stop();
     CallProcessing.SendMessages(BitConverter.GetBytes(callId.id));
     CallProcessing.SendMessages(BitConverter.GetBytes(callId.id));
     CallProcessing.SendMessages(BitConverter.GetBytes(callId.id));
     CallProcessing.Stop();
     LoggedInService.declineCall(this.callId);
     if (updateFriendViewOnClosing != null)
     {
         updateFriendViewOnClosing();
     }
 }
 public void sendSound(byte[] sound)
 {
     CallProcessing.SendMessages(sound);
 }