Applying ITABase mode naming refactoring

parent 64e1db46
......@@ -49,14 +49,7 @@ public:
CParams();
} oParams;
//! Output write modes
enum
{
OUTPUT_OVERWRITE = 0, //!< Overwrites output
OUTPUT_ADD = 1 //!< Adds to the output
};
CITABiquad();
virtual inline ~CITABiquad() {};
......
......@@ -45,7 +45,7 @@ public:
m_pGenerator = new CITAThirdOctaveFIRFilterGenerator( dSampleRate, m_iFilterLength );
m_pConvolver = new ITAUPConvolution( iBlockLength, m_iFilterLength );
m_pConvolver->SetFilterExchangeMode( ITAUPConvolution::CROSSFADE_COSINE_SQUARE );
m_pConvolver->SetFilterExchangeFadingFunction( ITABase::FadingFunction::COSINE_SQUARE );
m_pConvolver->SetFilterCrossfadeLength( 32 );
SetIdentity( false );
......@@ -66,7 +66,7 @@ public:
fm_zero( m_pfFilter, m_iFilterLength );
m_pfFilter[ iLatency ] = 1;
pFilter->Load( m_pfFilter, m_iFilterLength );
m_pConvolver->ExchangeFilter( pFilter, ( bSmoothChangeover ? ITAUPConvolution::AUTO : ITAUPConvolution::SWITCH ) );
m_pConvolver->ExchangeFilter( pFilter, ( bSmoothChangeover ? ITABase::FadingFunction::COSINE_SQUARE : ITABase::FadingFunction::SWITCH ) );
pFilter->Release(); // Auto-release
}
......@@ -75,7 +75,7 @@ public:
m_pGenerator->GenerateFilter( oMags, m_pfFilter );
ITAUPFilter* pFilter = m_pConvolver->RequestFilter();
pFilter->Load( m_pfFilter, m_iFilterLength );
m_pConvolver->ExchangeFilter( pFilter, ( bSmoothChangeover ? ITAUPConvolution::AUTO : ITAUPConvolution::SWITCH ) );
m_pConvolver->ExchangeFilter( pFilter, ( bSmoothChangeover ? ITABase::FadingFunction::COSINE_SQUARE : ITABase::FadingFunction::SWITCH ) );
pFilter->Release(); // Auto-release
}
......
#include <ITABiquad.h>
#include <ITAException.h>
#include <ITABaseDefinitions.h>
CITABiquad::CITABiquad()
{
......@@ -49,7 +50,7 @@ void CITABiquad::Process( const float* pfInputData, float* pfOutputData, const i
z1 = m_vfAccumulators[ 0 ];
z2 = m_vfAccumulators[ 1 ];
if( iOutputMode == CITABiquad::OUTPUT_ADD )
if( iOutputMode == ITABase::MixingMethod::ADD )
{
for( int i = 0; i < iNumSamples; i++ )
{
......@@ -61,7 +62,7 @@ void CITABiquad::Process( const float* pfInputData, float* pfOutputData, const i
z1 = z0;
}
}
else if( iOutputMode == CITABiquad::OUTPUT_OVERWRITE )
else if( iOutputMode == ITABase::MixingMethod::OVERWRITE )
{
for( int i = 0; i < iNumSamples; i++ )
{
......@@ -98,7 +99,7 @@ void CITABiquad::Process( const float* pfInputData, float* out, const int iNumSa
// Factor for linear gain
const float fLinearGainFactor = ( fOutputGain2 - fOutputGain1 ) / float( iNumSamples );
if( iOutputWriteMode == OUTPUT_ADD )
if( iOutputWriteMode == ITABase::MixingMethod::ADD )
{
for( int i = 0; i < iNumSamples; i++ )
{
......@@ -113,7 +114,7 @@ void CITABiquad::Process( const float* pfInputData, float* out, const int iNumSa
}
}
else if( iOutputWriteMode == CITABiquad::OUTPUT_OVERWRITE )
else if( iOutputWriteMode == ITABase::MixingMethod::OVERWRITE )
{
for( int i = 0; i < iNumSamples; i++ )
{
......
......@@ -370,7 +370,7 @@ void CITASIMOVariableDelayLine::ReadBlock( const int iCursorID, ITASampleBuffer*
m_psbTemp->cyclic_write( m_psbVDLBuffer, m_iFadeLength, iReadCursorCurrent, 0 );
psbOutput->cyclic_write( m_psbVDLBuffer, m_iBlockLength, iReadCursorNew, 0 );
psbOutput->Crossfade( m_psbTemp, 0, m_iFadeLength, ITASampleBuffer::CROSSFADE_FROM_SOURCE, ITASampleBuffer::COSINE_SQUARE );
psbOutput->Crossfade( m_psbTemp, 0, m_iFadeLength, ITABase::CrossfadeDirection::FROM_SOURCE, ITABase::FadingFunction::COSINE_SQUARE );
break;
}
......
......@@ -98,7 +98,7 @@ void CITAThirdOctaveFilterbankIIR::Process( const float* pfInputSamples, float*
m_vBiquads[ i*m_nBiquadsPerBand + j ].Process( m_sfTempFilterBuf.GetData(), m_sfTempFilterBuf.GetData(), m_iBlockLength );
const float fGain = oLatestMagnitudeUpdate.oMags[ i ];
const int iOutputWriteMode = ( i == 0 ? CITABiquad::OUTPUT_OVERWRITE : CITABiquad::OUTPUT_ADD );
const int iOutputWriteMode = ( i == 0 ? ITABase::MixingMethod::OVERWRITE : ITABase::MixingMethod::ADD );
m_vBiquads[ i*m_nBiquadsPerBand + iLastBandIndex ].Process( m_sfTempFilterBuf.GetData(), m_pfTempOutputBuf.GetData(), m_iBlockLength, fGain, iOutputWriteMode );
}
}
......@@ -117,7 +117,7 @@ void CITAThirdOctaveFilterbankIIR::Process( const float* pfInputSamples, float*
// Letztes Biquad mit Gain: tmp => output
const float fGain1 = m_oMagnitudesInternal[ i ];
const float fGain2 = oLatestMagnitudeUpdate.oMags[ i ];
m_vBiquads[ i*m_nBiquadsPerBand + iLastBandIndex ].Process( m_sfTempFilterBuf.GetData(), m_pfTempOutputBuf.GetData(), m_iBlockLength, fGain1, fGain2, ( i == 0 ? CITABiquad::OUTPUT_OVERWRITE : CITABiquad::OUTPUT_ADD ) );
m_vBiquads[ i*m_nBiquadsPerBand + iLastBandIndex ].Process( m_sfTempFilterBuf.GetData(), m_pfTempOutputBuf.GetData(), m_iBlockLength, fGain1, fGain2, ( i == 0 ? ITABase::MixingMethod::OVERWRITE : ITABase::MixingMethod::ADD ) );
}
}
......@@ -136,7 +136,7 @@ void CITAThirdOctaveFilterbankIIR::Process( const float* pfInputSamples, float*
m_vBiquads[ i*m_nBiquadsPerBand + j ].Process( m_sfTempFilterBuf.GetData(), m_sfTempFilterBuf.GetData(), m_iBlockLength );
// Letztes Biquad mit Gain: tmp => output
m_vBiquads[ i*m_nBiquadsPerBand + iLastBandIndex ].Process( m_sfTempFilterBuf.GetData(), m_pfTempOutputBuf.GetData(), m_iBlockLength, m_oMagnitudesInternal[ i ], ( i == 0 ? CITABiquad::OUTPUT_OVERWRITE : CITABiquad::OUTPUT_ADD ) );
m_vBiquads[ i*m_nBiquadsPerBand + iLastBandIndex ].Process( m_sfTempFilterBuf.GetData(), m_pfTempOutputBuf.GetData(), m_iBlockLength, m_oMagnitudesInternal[ i ], ( i == 0 ? ITABase::MixingMethod::OVERWRITE : ITABase::MixingMethod::ADD ) );
}
}
......
......@@ -389,7 +389,7 @@ void CITAVariableDelayLine::Process( const ITASampleBuffer* psbInput, ITASampleB
m_psbTemp->cyclic_write( m_psbVDLBuffer, m_iFadeLength, iReadCursorCurrent, 0 );
psbOutput->cyclic_write( m_psbVDLBuffer, m_iBlockLength, iReadCursorNew, 0 );
psbOutput->Crossfade( m_psbTemp, 0, m_iFadeLength, ITASampleBuffer::CROSSFADE_FROM_SOURCE, ITASampleBuffer::COSINE_SQUARE );
psbOutput->Crossfade( m_psbTemp, 0, m_iFadeLength, ITABase::CrossfadeDirection::FROM_SOURCE, ITABase::FadingFunction::COSINE_SQUARE );
break;
......
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