|
| void | SimpleCircularBuffer (int pSize, T pDefaultValue=0) |
| | Initialize Simple Circular Buffer Cyclic Buffer.
|
| |
| void | Add (T newSample) |
| | Add new value to buffer.
|
| |
| T | Get (T pIndex) |
| | Returns value from given index.
|
| |
| array< T > | GetValues () |
| | Returns array of values stored in buffer.
|
| |
◆ SimpleCircularBuffer()
| void SimpleCircularBuffer |
( |
int |
pSize, |
|
|
T |
pDefaultValue = 0 |
|
) |
| |
|
inlineprivate |
Initialize Simple Circular Buffer Cyclic Buffer.
- Parameters
-
| pSize | size of the buffer |
| pDefaultValue | initial value stored in buffer |
◆ Add()
Add new value to buffer.
- Parameters
-
| newSample | value that will be added to buffer |
- Returns
- average value from the buffer
ref SimpleCircularBuffer<float> m_Buffer = SimpleCircularBuffer<float>(2, -1);
m_Buffer.Add(0.1);
◆ Get()
Returns value from given index.
- Parameters
-
◆ GetValues()
Returns array of values stored in buffer.
- Parameters
-
◆ m_Pointer
| private int m_Pointer = 0 |
|
private |
◆ m_Samples
◆ m_Size
The documentation for this class was generated from the following file: