A circular buffer holding data of type {T}.
More...
|
| int | GetSamplesInOrder (T[] output) |
| | Copies values out of the circular buffer into the target array the samples are copied in order.
|
|
bool | TryGetSample (int sampleIndex, out T value) |
| | Attempts to read a specific sample index. Returns false if the sample is too old (overwritten) or hasn't been written yet.
|
|
|
bool | HasData [get] |
| | If the buffer has had any data writtetn to it.
|
|
T | Recent [get] |
| | Most recent value written, or default(T) if HasData == false.
|
A circular buffer holding data of type {T}.
- Template Parameters
-
| T | The type of data to be stored in the buffer |
◆ GetSamplesInOrder()
| int GetSamplesInOrder |
( |
T[] | output | ) |
|
Copies values out of the circular buffer into the target array the samples are copied in order.
- Parameters
-
| output | should be sized to BufferSize to fit a full buffer |
- Returns
- the number of samples written