quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_sp.a #include <FtrBuffer.h> FtrBuffer(); FtrBuffer(const FtrBuffer& arg); boolean eq(const FtrBuffer& arg) const; boolean setCoefName(const String& arg); long getLength(const String& cname) const;
description:FtrBuffer buf; String param1(L"some_features"); buf.addOrInitBuffer(param1, 1); buf.setLeftoverSamps(0);
static const String CLASS_NAME = L"FtrBuffer";
static const String PARAM_HASH = L"hash";
static const String PARAM_LENGTH = L"length";
static const String PARAM_FRAME_INDEX = L"frame_index";
static const String PARAM_LAST_INDEX = L"last_index";
static const String PARAM_COEF_NAME = L"coef_name";
static const String PARAM_LEFTOVER = L"leftover";
static const float ALL_TIME = -1;
static const float DEF_END_TIME = ALL_TIME;
static const float DEF_CONTEXT_WINDOW = ALL_TIME;
static const double DEF_FRAME_DURATION = 0.01;
static const long DEF_COEF_BUF_CAPACITY = 512;
static const long ERR = 80300;
HashTable<String, Vector< CircularBuffer<AlgorithmData> > > hash_d;
HashTable<String, Long> length_d;
Long frame_index_d;
Long last_index_d;
String coef_name_d;
Long leftover_samps_d;
static Integral::DEBUG debug_level_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
static boolean setDebug(Integral::DEBUG debug_level);
~FtrBuffer();
FtrBuffer();
FtrBuffer(const FtrBuffer& arg);
boolean assign(const FtrBuffer& arg);
long sofSize() const;
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean eq(const FtrBuffer& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);
boolean setCoefName(const String& arg);
boolean setFrameIndex(long arg);
boolean setLastIndex(long arg);
boolean setLeftoverSamps(long arg);
const String& getCoefName() const;
long getFrameIndex() const;
long getLastIndex() const;
long getLeftoverSamps() const;
long getLength(const String& cname) const;
const HashTable<String, Long>& getLength() const;
boolean addOrinitLength(const String& cname, long len = 0);
boolean setLengthToMax(const String& cname, long new_len);
boolean resetBuffer();
boolean contains(const String& arg) const;
Vector< CircularBuffer<AlgorithmData> >& getBuffer();
Vector< CircularBuffer<AlgorithmData> >& getBuffer(const String& cname);
const Vector< CircularBuffer<AlgorithmData> >& getBuffer() const;
const Vector< CircularBuffer<AlgorithmData> >& getBuffer(const String& cname) const;
AlgorithmData& getData(long ctag, long index, const String& cname);
const AlgorithmData& getData(long ctag, long index, const String& cname);
boolean addOrInitBuffer(const String& cname, long num_chan, long buf_cap = DEF_COEF_BUF_CAPACITY);
boolean ensureChannels(const String& cname, long num_chan);
boolean ensureBufferTrailingPad(const String& cname, long req_pad);
boolean ensureBufferLeadingPad(const String& cname, long req_pad);
boolean advanceRead();
boolean advanceCurr();
FtrBuffer buf; String param1(L"some_features"); String param2(L"other_features"); // single channel data // buf.addOrInitBuffer(param1); // multi-channel data // buf.addOrInitBuffer(param2, 2); // add some data to the circular buffer // AlgorithmData a; buf.getBuffer(param1)(0).append(a); // add some data to both channels of the other buffer // buf.getBuffer(param2)(0).append(a); buf.getBuffer(param2)(1).append(a);