/*-------------- FrvBuf.h by B.Mours Dec 2, 2002--------------------------*/ #ifndef FRVBUF #define FRVBUF #ifndef _POSIX_SOURCE #define _POSIX_SOURCE #endif #include "FrameL.h" #include "FrvCopy.h" #ifdef __cplusplus extern "C" { #endif struct FrvBuf { /* This is the FrVect Buffering object */ /*--------------------- input data -------------*/ int nDataOut; /* output vector size (number of bin) */ int step; /* step size (number of output bins) */ int outType; /* type for the output vector(-1 means as input)*/ int decimate; /* decimation */ int delay; /* internal buffer */ /*------------------- internal data ------------*/ char* work; /* working area */ long first; /* index of the first point in the work space */ long last; /* index of the last point in the work space */ long workSize; /* # of elements (not bytes) for the work space*/ long readyToUse; /* index of the point to be reached to output data*/ double lastGTime; FrVect *input; /* input working vector (point to work) */ /* ------------output------------------------- */ FrVect *output; /* output data (point to work) */ }; typedef struct FrvBuf FrvBuf; void FrvBufFree (FrvBuf* buffer); int FrvBufFeed (FrvBuf *buffer, FrVect *vect); int FrvBufGetNext(FrvBuf *buffer); int FrvBufInit (FrvBuf *buffer, FrVect *vect); FrvBuf* FrvBufNew(int outSize,int step,int outType,int decimate,int delay); int FrvBufStillToGo(FrvBuf *buffer); #ifdef __cplusplus } #endif #endif