16#include <include/qlibs_types.hpp>
32 class tdl :
private nonCopyable {
39 size_t itemCount{ 0U };
40 const real_t undefined{ 0.0_re/0.0_re };
42 void insertNewest(
const real_t sample )
noexcept;
43 void removeOldest(
void )
noexcept;
57 const real_t initVal = 0.0_re )
59 setup( area, n, initVal );
67 template <
size_t numberOfDelays>
69 const real_t initVal = 0.0_re )
noexcept
71 setup( area, numberOfDelays, initVal );
84 const real_t initVal = 0.0_re )
noexcept;
93 template <
size_t numberOfDelays>
95 const real_t initVal = 0.0_re )
noexcept
97 setup( area, numberOfDelays, initVal );
155 return (
nullptr != head );
A Tapped Delay Line (TDL) object.
Definition tdl.hpp:32
bool isInitialized(void) const
Check if the TDL has been initialized.
Definition tdl.hpp:154
void operator()(const real_t sample) noexcept
Insert a new sample to the TDL removing the oldest sample.
Definition tdl.hpp:145
void setup(real_t *const area, const size_t n, const real_t initVal=0.0_re) noexcept
Setup and initialize a Tapped Delay Line (TDL) instance by setting the default optimal parameters.
real_t getRecent(void) const noexcept
Get the most recent sample from the TDL x(k)
real_t getAtIndex(const size_t i) const noexcept
Get the specified delayed sample from the TDL x(k-i)
virtual ~tdl()
Definition tdl.hpp:46
void setup(real_t(&area)[numberOfDelays], const real_t initVal=0.0_re) noexcept
Setup and initialize a Tapped Delay Line (TDL) instance by setting the default optimal parameters.
Definition tdl.hpp:94
tdl(real_t *const area, const size_t n, const real_t initVal=0.0_re)
Constructor for the Tapped Delay Line (TDL) instance.
Definition tdl.hpp:55
tdl(real_t(&area)[numberOfDelays], const real_t initVal=0.0_re) noexcept
Constructor for the Tapped Delay Line (TDL) instance.
Definition tdl.hpp:68
real_t getOldest(void) const noexcept
Get the oldest sample from the TDL x(k-n)
const real_t & operator[](int index) noexcept
Get the specified delayed sample from the TDL x(k-i)
void flush(const real_t initVal=0.0_re) noexcept
Clears all delays from the TDL and sets them to the specified value.
void insertSample(const real_t sample) noexcept
Insert a new sample to the TDL removing the oldest sample.
The qLibs++ library namespace.
Definition fp16.cpp:4
float real_t
A type to instantiate a real variable double-precision of 64-bits IEEE 754.
Definition qlibs_types.hpp:43