MityDSP Documentation Index

tcDspCircBuffer

Introduction

The tcDspCircBuffer class is used to implement a generic circular buffer (FIFO). Once created, the data is accessed via thread-safe Read and Write methods.

See also:
MityDSP::tcDspCircBuffer Class Reference

Example

This is a simple example of tcDspCircBuffer creation and usage:

 {
     tcDspCircBuffer *myCircBuff = new tcDspCircBuffer(1024);
     char             myInput[64];
     char             myOutput[64];
     int              bytes;

     ...

     // add data to buffer
     bytes = myCircBuff->Write(myInput, 64);

     ...

     // read data from buffer
     bytes = myCircBuffer->Read(myOutput, 64);
     
     ...
 } 

  
Generated on Fri Sep 23 16:33:44 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.