MityDSP Documentation Index

MityDSP::tcDspCircularIndex::tcCircularRead Class Reference

#include <DspCircularIndex.h>

List of all members.

Public Member Functions

 tcCircularRead (tcDspCircularIndex &aIndex)
 ~tcCircularRead ()
 Destructor: perform a call to end the read.
int StartRead (int aMaxRead=mnEndOfBuffer)
 Start a read of the specified number of entries.
int ReadNext (void)
 Bump the read index and return the next index to use.

Constructor & Destructor Documentation

MityDSP::tcDspCircularIndex::tcCircularRead::tcCircularRead ( tcDspCircularIndex aIndex  )  [inline]
MityDSP::tcDspCircularIndex::tcCircularRead::~tcCircularRead (  )  [inline]

Destructor: perform a call to end the read.

Writes will spill during a read if the buffer becomes full.


Member Function Documentation

int MityDSP::tcDspCircularIndex::tcCircularRead::StartRead ( int  aMaxRead = mnEndOfBuffer  )  [inline]

Start a read of the specified number of entries.

Parameters:
[in] aMaxRead - max number of entries to read.

While a read is being done, writes to the buffer can still happen. If a maximum number of entries is not specified, it is actually possible to have a continuous read that never stops. This could happen if the rate of writing is about the same as the rate of reading. Specifying a maximum number of entries to read makes the read finite which is usually what is desired.

Returns:
returns the value of the initial index to read or tcDspCircularIndex::mnEndOfBuffer if the buffer is empty
int MityDSP::tcDspCircularIndex::tcCircularRead::ReadNext ( void   )  [inline]

Bump the read index and return the next index to use.

Returns:
returns the next index to use or tcDspCircularIndex::mnEndOfBuffer if the buffer is empty.

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