⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cirqueue.h

📁 我写的基于2410的音频播放的程序
💻 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 + -