procedure InitCircularBuffer(BufferSize: Integer; IncrementStep: Double; var State: TCircularBufferState);
Initialize a circular buffer.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | BufferSize | Integer | |
| 2 | IncrementStep | Double | scalar |
| 3 | State | TCircularBufferState |
Result: stored in self (calling object)
Remarks:
Initializes circular buffer State variable. BufferSize is the new buffer size. Buffer holds the actual data and its size is adjusted to match BufferSize. IncrementStep defines the step by how much will the buffer increase when auto-resizing. NewBufferLength = OldBufferLength*IncrementStep; Auto-resizing is performed by SignalUtils.WriteToCircularBuffer routine. The incrementStep parameter will be forced in to interval between 1 and 10.