|
CLAM-Development
1.4.0
|
Specialization of the CircularBuffer class for the case of Audio chunks. More...
#include <AudioCircularBuffer.hxx>
Public Member Functions | |
| AudioCircularBuffer () | |
| CONSTRUCTION. | |
| AudioCircularBuffer (TSize bufferSize) | |
| void | ReadAudio (Audio &in) |
| void | NonCopyReadAudio (Audio &in) |
| void | WriteAudio (const Audio &in) |
| void | AddAudio (const Audio &in) |
Public Member Functions inherited from CLAM::CircularBuffer< TData > | |
| CircularBuffer () | |
| Default constructor. | |
| CircularBuffer (TSize bufferSize) | |
| Constructor which initializes the buffer to a certain capacity. | |
| TSize | GetBufferSize () const |
| Returns the circular buffer's buffer size. | |
| void | SetBufferSize (TSize size) |
| Resizes the buffer to a new capacity (or buffer size). | |
| TSize | GetWriteIndex () const |
| Returns the index of the element that the buffer is about to write (ie. | |
| TSize | GetReadIndex () const |
| Returns the index of the element that the buffer is about to read (ie. | |
| TSize | GetInitialReadOffset () const |
| Returns the initial read offset. | |
| void | SetInitialReadOffset (TSize size) |
| Sets the initial read offset. | |
| TSize | GetInitialWriteOffset () const |
| Returns the initial write offset. | |
| void | SetInitialWriteOffset (TSize size) |
| Sets the initial write offset. | |
| void | Init () |
| Initializes the buffer by setting all elements to 0 and making sure read/write indices are set correctly (taking into account initial read/write offsets). | |
| void | SetBufferToZero () |
| Sets all elements in circular buffer to zero. | |
| void | InitPointers () |
| Initializes read/write indices (taking into account initial read/write offsets). | |
| void | Read (TData &element) |
| Reads a single element at the current read index into element. | |
| void | Read (TData *buffer) |
| Reads read size number of elements starting at the current read index into buffer. | |
| void | Read (Array< TData > &in, TSize offset=0) |
| Reads read size number of elements starting at the current read index into the array at the specified offset (default: offset = 0). | |
| void | NonCopyRead (Array< TData > &buffer) |
| void | Write (const TData &element) |
| Writes a single element at the current write index. | |
| void | Write (const TData *buffer) |
| Writes write size number of elements starting at the current write index from buffer. | |
| void | Write (const Array< TData > &in, TSize offset=0) |
| Writes write size number of elements starting at the current write index from the array starting at the specified offset (default: offset = 0). | |
| void | Add (const TData &elem) |
| Does an additive write of a single element at the current write index. | |
| void | Add (const Array< TData > &in, TSize offset=0) |
| Does an additive write of write size number of elements at the current write index onwards from the specified input array starting at the specified offset (default: offset = 0) onwards. | |
| void | IncreaseReadIndex (TSize step=1) |
| Increases the read index by the specified number of elements (default: step = 1). | |
| void | IncreaseWriteIndex (TSize step=1) |
| Increases the write index by the specified number of elements (default: step = 1). | |
| void | DecreaseReadIndex (TSize step=1) |
| Decreases the read index by the specified number of elements (default: step = 1). | |
| void | DecreaseWriteIndex (TSize step=1) |
| Decreases the write index by the specified number of elements (default: step = 1). | |
| TData & | GetPtrToElement (int absPos) |
| Returns a pointer (well, reference) to the element at the specified index. | |
| TSize | GetReadSize () const |
| Returns the current read size. | |
| TSize | GetWriteSize () const |
| Returns the current write size. | |
| void | SetReadSize (TSize size) |
| Sets the read size. | |
| void | SetWriteSize (TSize size) |
| Sets the write size. | |
Additional Inherited Members | |
Protected Attributes inherited from CLAM::CircularBuffer< TData > | |
| Array< TData > | mBuffer |
| TSize | mLogicalSize |
| TSize | mReadSize |
| TSize | mWriteSize |
| TSize | mWriteIndex |
| TSize | mReadIndex |
| TSize | mInitialReadOffset |
| TSize | mInitialWriteOffset |
Specialization of the CircularBuffer class for the case of Audio chunks.
Definition at line 36 of file AudioCircularBuffer.hxx.
|
inline |
CONSTRUCTION.
Definition at line 44 of file AudioCircularBuffer.hxx.
|
inline |
Definition at line 46 of file AudioCircularBuffer.hxx.
|
inline |
Definition at line 67 of file AudioCircularBuffer.hxx.
References CLAM::CircularBuffer< TData >::Add().
|
inline |
Definition at line 57 of file AudioCircularBuffer.hxx.
References CLAM::CircularBuffer< TData >::NonCopyRead().
|
inline |
Definition at line 52 of file AudioCircularBuffer.hxx.
References CLAM::CircularBuffer< TData >::Read().
|
inline |
Definition at line 62 of file AudioCircularBuffer.hxx.
References CLAM::CircularBuffer< TData >::Write().
1.8.1