📄 cirqueue.h
字号:
/*
Circle Queue Define for
CLient Buffer for Sampling and NetWork Send Operation
Server Buffer for RePlaying and NetWork Receive Operation
Fu QingYun 2007-05-15
*/
#ifndef _cirqueue_h
#define _cirqueue_h
class CirQueue
{
//const int QueueSize = 8;
// const int SampleSize = 1024;
// Define Queue Size
enum mDef{QueueSize = 8, SampleSize = 1024};
// Queue for Stroe Samples
unsigned char data[QueueSize][SampleSize];
// Sample Size
unsigned int data_size[QueueSize];
// Queue Head Index
unsigned char head;
// Queue Tail Index
unsigned char tail;
// Current Number of Sample
unsigned char cursize;
public:
// If Queue is Empty
bool IsEmpty();
// If Queue is Full
bool IsFull();
// Insert a Sample into Queue
bool Insert(char * inbuf, int &data_len);
// Remove a Sample from Queue
bool Remove(char * inbuf, int &data_len);
// Constructor
CirQueue();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -