Пример #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
                return;

            if (disposing)
            {
                // free other managed objects that implement
                // IDisposable only
                if (asio != null)
                    asio.Dispose();
                if (timer != null)
                    timer.Dispose();
            }

            // release any unmanaged objects
            // set the object references to null

            asio = null;
            matchedfilter = null;
            timer = null;

            _disposed = true;
        }
Пример #2
0
 public bool InitializeDriver(InstalledDriver driver)
 {
     asio = new ASIO(driver, _inputChannels, _outputChannels, Convert.ToInt32(ASIO.Fs));
     Debug.WriteLine("Starting timer.");
     //TODO back to 250 ms
     timer = new System.Timers.Timer(sampleLength * 1000 * (matchedFilterEnabled && !matchedFilterToep ? 2 : 2)); // TEST: 8 times longer
     timer.Elapsed += timer_Elapsed;
     timer.Start();
     asio.IsInputEnabled = true;
     return true;
 }