#include <DspCircularIndex.h>
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. |
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.
int MityDSP::tcDspCircularIndex::tcCircularRead::StartRead | ( | int | aMaxRead = mnEndOfBuffer |
) | [inline] |
Start a read of the specified number of entries.
[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.
int MityDSP::tcDspCircularIndex::tcCircularRead::ReadNext | ( | void | ) | [inline] |
Bump the read index and return the next index to use.