#ifndef FILTERCONNECTION_H #define FILTERCONNECTION_H #include #include "Connection.h" #define BUFFSIZE 128 //WE SHOULD HAVE A BUFFER MAKER /* * 5.1.1.2 FilterConnection Interface * Inherits from Connection. * connectFrom(conn:Connection) Accepts a connection FROM conn connection. * The current filterConnection accepts the connection as an input to the connection. * process() A step taken which will read in data and output data, fills and dumps * one buffer. Must be called to move audio. * disconnectFrom(conn:Connection) Disconnects an incoming patch between the current * connection and "conn" connection. * disconnectTo(conn:Connection)Disconnects an outgoing patch between current * connection and "conn" connection. * */ template class FilterConnection : private Connection { public: void connectFrom(Connection &conn); // Accepts a connection FROM conn connection. virtual void process(); // A step taken which will read in data and output data, // fills and dumps one buffer. Must be called to move audio. void disconnectFrom(Connection &conn); //Disconnects an incoming patch between the current //connection and "conn" connection. void disconnectTo(Connection &conn);//Disconnects an outgoing patch between current //connection and "conn" connection. virtual ~FilterConnection(); virtual string xmlType(); //FILTER/INPUT/OUTPUT string * getXML(); FilterConnection(BufferedFile fd); FilterConnection(BufferedFile fd,string name); protected: void * buffer; void * buffer2; vector*> inConnections; private: void destruct(); void initBuffer(); }; #endif