SignalUtils.WriteToCircularBuffer Method

procedure WriteToCircularBuffer(Buffer: TVec; Src: TVec; var State: TCircularBufferState; AutoResize: Boolean);

Copy data to circular buffer.

#NameTypeDescription
1BufferTVecsource TVec
2SrcTVecsource TVec
3StateTCircularBufferState
4AutoResizeBoolean

Result: stored in self (calling object)

Remarks:

Copies Src.Length samples from Src to Buffer. If there is not enough space available and the data that has not yet been read will be overwritten, the BufferOverflow flag will be set in the State variable. The routine advances WritePosition of the buffer to the position where the next data block is to be written to. If AutoResize is True the buffer will be resized before the buffer is underrun or overrun. The size of the buffer will increased by IncrementStep parameter passed to the SignalUtils.InitCircularBuffer.

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