Beispiel #1
0
 public override void PrepareProcessing()
 {
     _portIn.PrepareProcessing(
         DefaultParameters.DefaultQueueMilliseconds.ToSamples(_portIn.Samplerate),
         DefaultParameters.DefaultBufferMilliseconds.ToSamples(_portIn.Samplerate)
         );
 }
        public override void PrepareProcessing()
        {
            _portIn.PrepareProcessing(
                DefaultParameters.DefaultQueueMilliseconds.ToSamples(_portIn.Samplerate),
                DefaultParameters.DefaultBufferMilliseconds.ToSamples(_portIn.Samplerate)
                );

            Session.SetNodeState(this, NidaqSession.NodeState.Prepared);
        }
Beispiel #3
0
        private void InitBuffers()
        {
            _portInp.PrepareProcessing(
                Math.Max(DefaultParameters.MinimumQueueFrameCount * FFTSize, DefaultParameters.DefaultQueueMilliseconds.ToSamples(_portInp.Samplerate)),
                Math.Max(FFTSize, DefaultParameters.DefaultBufferMilliseconds.ToSamples(_portOut.Samplerate))
                );

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

            _frameBuffer = new double[FFTSize];
        }