AnimatLab  2
Test
DelayLine.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
22  class ANIMAT_PORT DelayLine
23  {
24  protected:
26  CStdArray<float> m_aryRingBuf;
27 
30 
33 
35  int m_iSaveIdx;
36 
38  int m_iReadIdx;
39 
40  public:
41  DelayLine();
42  virtual ~DelayLine();
43 
44  void Initialize(float fltDelayTime, float fltTimeStep);
45  void AddValue(float fltVal);
46  float ReadValue();
47  };
48 
49 
50 } //AnimatSim
Root namespace for the base simulation library for AnimatLab.
CStdArray< float > m_aryRingBuf
Ring buffer of float values.
Definition: DelayLine.h:26
Implements a Delay line of float values.
Definition: DelayLine.h:22
int m_iDelayComp
Size of the ring buffer-1.
Definition: DelayLine.h:32
int m_iSaveIdx
The index where the next new value will be saved in the ring.
Definition: DelayLine.h:35
int m_iReadIdx
The index where we read the current top value off the ring.
Definition: DelayLine.h:38
int m_iDelaySize
Size of the ring buffer.
Definition: DelayLine.h:29