SignalUtils.InitCircularBuffer Method

procedure InitCircularBuffer(BufferSize: Integer; IncrementStep: Double; var State: TCircularBufferState);

Initialize a circular buffer.

#NameTypeDescription
1BufferSizeInteger
2IncrementStepDoublescalar
3StateTCircularBufferState

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.

See Also: SignalUtils.CircularBuffer, SignalUtils.WriteToCircularBuffer, SignalUtils.ReadFromCircularBuffer, SignalUtils.ResizeCircularBuffer, SignalUtils.MonitorCircularBuffer