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
Esempio n. 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();
        }
Esempio n. 2
0
        public void EndCall()
        {
            if (_audioChannel != null)
            {
                _audioChannel.SampleReady -= AudioChannelSampleReady;
                _audioChannel.Close();
                _audioChannel = null;
            }

            _rtpManager.OnRemoteVideoSampleReady -= EncodedVideoSampleReceived;
            _rtpManager.OnRemoteAudioSampleReady -= RemoteAudioSampleReceived;
            _rtpManager.Close();
        }
Esempio n. 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();
            }
        }
Esempio n. 4
0
 public void StopAudio()
 {
     if (_audioChannel != null)
     {
         _dispatcher.DoOnUIThread(() =>
         {
             _audioChannel.Close();
             _audioChannel = null;
         });
     }
 }