Commit 6258e877 authored by henryjandrew's avatar henryjandrew
Browse files

added initialise to IIREngine

parent 7149838c
......@@ -36,11 +36,15 @@
class ITA_DSP_API CITAIIRFilterEngine
{
public:
CITAIIRFilterEngine();
CITAIIRFilterEngine( unsigned int iOrder );
virtual inline ~CITAIIRFilterEngine() {};
void Initialise(unsigned int uiOrder);
void Reset();
//! Clears all accumulators
......
......@@ -113,10 +113,12 @@ public:
* @param iReservedMaxDelaySamples Initiale maximale Verzgerung [Anzahl Samples]
*/
CITASIMOVariableDelayLineBase( const int iReservedMaxDelaySamples );
CITASIMOVariableDelayLineBase();
//! Destruktor der variablen Verzgerungsleitung
~CITASIMOVariableDelayLineBase();
void Initialise(const int iReservedMaxDelaySamples);
//! Maximal Verzgerung zurckgeben [Samples]
/**
* Maximale mgliche Verzgerung auf dem momentan
......
......@@ -4,9 +4,18 @@
#include <cassert>
CITAIIRFilterEngine::CITAIIRFilterEngine()
:m_uiCursor( 0 )
{
}
CITAIIRFilterEngine::CITAIIRFilterEngine( unsigned int uiOrder )
: m_uiCursor( 0 )
{
Initialise(uiOrder);
}
void CITAIIRFilterEngine::Initialise( unsigned int uiOrder ) {
m_oCoeffs.InitialiseOrder( uiOrder );
m_vfAccumulator.resize( uiOrder + 1 );
Reset();
......
......@@ -16,13 +16,13 @@ CITASIMOVariableDelayLineBase::CITASIMOVariableDelayLineBase( const int iReserve
: m_psbVDLBuffer( nullptr )
, m_psbTemp( nullptr )
{
assert( iReservedMaxDelaySamples > 0 );
m_psbTemp = new ITASampleBuffer( iReservedMaxDelaySamples, true );
ReserveMaximumDelaySamples( iReservedMaxDelaySamples );
Initialise(iReservedMaxDelaySamples);
}
Clear();
CITASIMOVariableDelayLineBase::CITASIMOVariableDelayLineBase()
: m_psbVDLBuffer(nullptr)
, m_psbTemp(nullptr)
{
}
void CITASIMOVariableDelayLineBase::Clear()
......@@ -41,6 +41,17 @@ CITASIMOVariableDelayLineBase::~CITASIMOVariableDelayLineBase()
delete m_psbTemp;
}
void CITASIMOVariableDelayLineBase::Initialise(const int ReservedMaxDelaySamples)
{
assert(ReservedMaxDelaySamples > 0);
m_psbTemp = new ITASampleBuffer(ReservedMaxDelaySamples, true);
ReserveMaximumDelaySamples(ReservedMaxDelaySamples);
Clear();
}
int CITASIMOVariableDelayLineBase::GetReservedMaximumDelaySamples() const
{
return m_iVDLBufferSize;
......@@ -201,7 +212,7 @@ int CITASIMOVariableDelayLineBase::GetCurrentDelaySamples( const int iCursorID )
std::map< int, CITAVDLReadCursor >::const_iterator cit = m_lUserCursors.find( iCursorID );
const CITAVDLReadCursor& oReadCursor( cit->second );
return oReadCursor.iNewReadCursorSamples;
return oReadCursor.iOldReadCursorSamples;
}
int CITASIMOVariableDelayLineBase::GetNewDelaySamples( const int iCursorID ) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment