private AudioSession(Utilities.NativeMethods.IAudioSessionControl2 ctl, Utilities.NativeMethods.ISimpleAudioVolume sav)
 {
     _ctl          = ctl;
     _sav          = sav;
     classInstance = new UpdateClass(this);
     Marshal.ThrowExceptionForHR(_ctl.RegisterAudioSessionNotification(classInstance));
 }
        public void Dispose()
        {
            if (_ctl != null)
            {
                Marshal.ReleaseComObject(_ctl);
                _ctl = null;
            }

            _process?.Dispose();

            GC.SuppressFinalize(this);
        }