Ejemplo n.º 1
0
        public override void PrepareProcessing()
        {
            if (_port.FFTSize <= 0)
            {
                throw new InvalidOperationException("FFT Size must be > 0!");
            }

            _port.PrepareProcessing(
                Math.Max(DefaultParameters.MinimumQueueFrameCount, DefaultParameters.DefaultQueueMilliseconds.ToFrames(_port.Samplerate, _port.FrameSize)),
                Math.Max(DefaultParameters.MinimumBufferFrameCount, DefaultParameters.DefaultBufferMilliseconds.ToFrames(_port.Samplerate, _port.FrameSize))
                );

            _queue = new RingBufferFFT(1, FFTSize, Samplerate)
            {
                Overflow = true
            };

            lock (_wndLock) {
                if (_wnd != null)
                {
                    _wnd.PrepareProcessing();
                    _wnd.Run = true;
                }
            }
        }
Ejemplo n.º 2
0
        public override void PrepareProcessing()
        {
            if (_port.FFTSize <= 0)
            {
                throw new InvalidOperationException("FFT Size must be > 0!");
            }

            _port.PrepareProcessing(
                Math.Max(DefaultParameters.MinimumQueueFrameCount, DefaultParameters.DefaultQueueMilliseconds.ToFrames(_port.Samplerate, _port.FrameSize)),
                Math.Max(DefaultParameters.MinimumBufferFrameCount, DefaultParameters.DefaultBufferMilliseconds.ToFrames(_port.Samplerate, _port.FrameSize))
                );

            _queue = new RingBufferFFT(_port.Capacity, FFTSize, _port.Samplerate)
            {
                Overflow = true
            };

            UpdateWindowSettings();
        }