Ejemplo n.º 1
0
        private void StopThreads()
        {
            if (USBRX != null)
            {
                USBRX.CurrentMode = LibRXFFT.Libraries.eTransferMode.Stopped;
            }

            if (PowerUpdateThread != null)
            {
                PowerUpdateThread.Abort();
                PowerUpdateThread = null;
            }

            if (DemodDlg != null)
            {
                DemodDlg.Close();
                DemodDlg = null;
            }

            if (Demod != null)
            {
                Demod.AudioInSampleSource.Close();
                Demod.AudioOutShmem.Close();
                Demod.Stop();
                Demod = null;
            }

            if (USBRX != null)
            {
                USBRX.Close();
                USBRX = null;
            }
        }
Ejemplo n.º 2
0
        public virtual void CloseTuner()
        {
            DeviceClosed?.Invoke(this, EventArgs.Empty);

            if (Connected)
            {
                USBRX.Tuner.CloseTuner();
                USBRX.CurrentMode = eTransferMode.Stopped;
                USBRX.Close();
                USBRX = null;
                _SampleSource.Close();

                Connected = false;
            }

            Hide();
        }