Esempio n. 1
0
        private void dispose()
        {
            if (_scenes != null)
            {
                foreach (KeyValuePair <SceneType, Scene> kv in _scenes)
                {
                    if (kv.Value != null)
                    {
                        kv.Value.Dispose();
                    }
                }
            }
            if (_player != null)
            {
                _player.Dispose();
            }
            if (_prevMap != null)
            {
                _prevMap.Dispose();
            }

            ResourceManager.Release();
            if (_audioInput != null)
            {
                _audioInput.Disposed += (s, e) =>
                {
                    _disposed = true;
                };
                _audioInput.CaptureStopped += (s, e) =>
                {
                    _audioInput.Dispose();
                };
                _audioInput.StopCapture();
            }
        }
Esempio n. 2
0
 private void button4_Click(object sender, EventArgs e)
 {
     _input.StopCapture();
 }