Exemple #1
0
        private void GetAudioCaptureClient()
        {
            object result;
            var    IID_AUDIO_CAPTURE_CLIENT = typeof(IAudioCaptureClient).GUID;

            Marshal.ThrowExceptionForHR(_realAudioClient.GetService(IID_AUDIO_CAPTURE_CLIENT, out result));
            _AudioCaptureClient = new AudioCaptureClient(result as IAudioCaptureClient);
        }
Exemple #2
0
        /// <summary>
        /// Dispose
        /// </summary>
        public void Dispose()
        {
            if (_realAudioClient == null)
            {
                return;
            }

            /*
             * _AudioRenderClient?.Dispose();
             * _AudioCaptureClient?.Dispose();
             */
            mixFormat           = null;
            _AudioRenderClient  = null;
            _AudioCaptureClient = null;
            Marshal.ReleaseComObject(_realAudioClient);
            _realAudioClient = null;
            GC.SuppressFinalize(this);
        }