private static void SaveFftInputBuffer(FFTInputPort p, NodeState to) { if (p.Queue != null) { to.WriteValue(to.PortValues, p.Name, p.Queue.GetState()); } }
private static void LoadFftInputBuffer(NodeState from, FFTInputPort to) { if (to.Queue != null) { to.LoadBuffer((SignalRingBuffer)from.PortValues[to.Name]); } }
private void DataFftProcessor(FFTInputPort port) { lock (_dataLock) { if (State != ProcessingState.Running) { return; } // Graph wont start if FFTSize is 0, don't have to check for DivByZero //var queuelen = port.Queue?.Length ?? 0; //var buflen = port.FFTSize; //var packets = queuelen / buflen; //for (int i = 0; i < packets; i++) { FftDataAvailable(port); //} } }
protected virtual void FftDataAvailable(FFTInputPort port) { }