Close() public method

Called when the audo channel is no longer required, such as when the VoIP call using it has terminated, and all resources can be shutdown and closed.
public Close ( ) : void
return void
コード例 #1
0
        /// <summary>
        /// The Google Voice call has completely finished and it's now safe to shutdown the audio channel.
        /// </summary>
        private void CallFinished()
        {
            if (_audioChannel != null)
            {
                _audioChannel.Close();
            }

            CallEnded();
        }
コード例 #2
0
        public void EndCall()
        {
            if (_audioChannel != null)
            {
                _audioChannel.SampleReady -= AudioChannelSampleReady;
                _audioChannel.Close();
                _audioChannel = null;
            }

            _rtpManager.OnRemoteVideoSampleReady -= EncodedVideoSampleReceived;
            _rtpManager.OnRemoteAudioSampleReady -= RemoteAudioSampleReceived;
            _rtpManager.Close();
        }
コード例 #3
0
        /// <summary>
        /// Shutdown the SIP tranpsort layer and any other resources the SIP client is using. Typically called when the application exits.
        /// </summary>
        public void Shutdown()
        {
            if (m_sipTransport != null)
            {
                m_sipTransport.Shutdown();
            }

            DNSManager.Stop();

            if (_audioChannel != null)
            {
                _audioChannel.Close();
            }
        }
コード例 #4
0
 public void StopAudio()
 {
     if (_audioChannel != null)
     {
         _dispatcher.DoOnUIThread(() =>
         {
             _audioChannel.Close();
             _audioChannel = null;
         });
     }
 }