SignalUtils.CircularBuffer Method

procedure CircularBuffer(Buffer: TVec; Source: TVec; BuffSize: Integer);

Copy data to a circular buffer.

#NameTypeDescription
1BufferTVecsource TVec
2SourceTVecsource TVec
3BuffSizeInteger

Result: stored in self (calling object)

Remarks:

Shifts the Buffer data to the left, to make room for new Source data and copies Source to the Buffer. BufferSize defines the maximum size up to which the Buffer will increase and before the shifting begins. When BufferSizse is exceeded the oldest data is dropped to make space for the new.

Note
This function is not very efficient for very big buffers, but it is very simple to use.

See Also: SignalUtils.InitCircularBuffer, SignalUtils.WriteToCircularBuffer, SignalUtils.ReadFromCircularBuffer