// Copyright (C) 2001 Jean-Marc Valin #include "IntfNode.h" //@implements core using namespace std; namespace FD { IntfNode::IntfNode(string nodeName, const ParameterSet ¶ms) : Node(nodeName, params) , lookAhead(0) , lookBack(0) { outputID = addOutput("OUTPUT"); } void IntfNode::request(int outputID, const ParameterSet &req) { if (req.exist("LOOKAHEAD")) lookAhead = max(lookAhead,dereference_cast (req.get("LOOKAHEAD"))); if (req.exist("LOOKBACK")) lookBack = max(lookBack,dereference_cast (req.get("LOOKBACK"))); } void IntfNode::init() { buff = new Buffer(lookAhead+lookBack+1); //cerr << "buffsize: " << lookAhead+lookBack+1 << endl; //for (int i=0;igetCurrentPos() << endl; return (*buff).get(count); //return (*buff)[count]; } void IntfNode::setValue(int count, ObjectRef val) { //cerr << "set " << count << " " << buff->getCurrentPos() << endl; //(*buff)[count+lookAhead] = val; (*buff)[count] = val; } }//namespace FD