コード例 #1
0
        public void EnableVoiceAdapter(VoiceAdapter voiceAdapter)
        {
            if (this.VoiceAdapter != null)
            {
                DisableVoiceAdapter();
            }

            lock (this)
            {
                this.VoiceAdapter = voiceAdapter;
            }
        }
コード例 #2
0
        public void DisableVoiceAdapter()
        {
            lock (this)
            {
                if (this.VoiceAdapter == null)
                {
                    return;
                }

                try
                {
                    this.VoiceAdapter.Dispose();
                }
                catch
                {
                    throw;
                }
                finally
                {
                    this.VoiceAdapter = null;
                }
            }
        }