Minor fixes after refactoring

parent 4aabc712
......@@ -27,13 +27,13 @@ ITANCTCStreamFilter::ITANCTCStreamFilter( const ITANCTCStreamFilter::Config& oC
for( int n=0; n<oConfig.N; n++ )
{
ITAUPConvolution* pConvolverL = new ITAUPConvolution( oConfig.iBlockLength, oConfig.iFilterLength, m_pFilterPool );
pConvolverL->setFilterExchangeMode( oConfig.iFilterExchangeMode );
pConvolverL->setFilterCrossfadeLength( oConfig.iFilterCrossfadeLength );
pConvolverL->SetFilterExchangeMode( oConfig.iFilterExchangeMode );
pConvolverL->SetFilterCrossfadeLength( oConfig.iFilterCrossfadeLength );
m_vpConvolvers.push_back( pConvolverL );
ITAUPConvolution* pConvolverR = new ITAUPConvolution( oConfig.iBlockLength, oConfig.iFilterLength, m_pFilterPool );
pConvolverR->setFilterExchangeMode( oConfig.iFilterExchangeMode );
pConvolverR->setFilterCrossfadeLength( oConfig.iFilterCrossfadeLength );
pConvolverR->SetFilterExchangeMode( oConfig.iFilterExchangeMode );
pConvolverR->SetFilterCrossfadeLength( oConfig.iFilterCrossfadeLength );
m_vpConvolvers.push_back( pConvolverR );
}
......@@ -98,27 +98,27 @@ void ITANCTCStreamFilter::ExchangeFilters( const std::vector< ITAHDFTSpectra* >&
// Left binaural signal
ITAUPConvolution* pConvolverL( m_vpConvolvers[iIdxLeft] );
ITAUPFilter* pNewFilterL = m_pFilterPool->requestFilter();
ITAUPFilter* pNewFilterL = m_pFilterPool->RequestFilter();
sbSpectrum.write( oCTCFilterL.data(), sbSpectrum.length() );
fIn = sbSpectrum.data();
fOut = sbImpulseResponse.data();
ifft.execute( fIn, fOut );
sbImpulseResponse.div_scalar( float( sbImpulseResponse.length() ) );
pNewFilterL->load( sbImpulseResponse.data(), sbImpulseResponse.length() );
pConvolverL->exchangeFilter( pNewFilterL );
pNewFilterL->release();
pNewFilterL->Load( sbImpulseResponse.data(), sbImpulseResponse.length() );
pConvolverL->ExchangeFilter( pNewFilterL );
pNewFilterL->Release();
// Right binaural signal
ITAUPConvolution* pConvolverR( m_vpConvolvers[iIdxRight] );
ITAUPFilter* pNewFilterR = m_pFilterPool->requestFilter();
ITAUPFilter* pNewFilterR = m_pFilterPool->RequestFilter();
sbSpectrum.write( oCTCFilterR.data(), sbSpectrum.length() );
fIn = sbSpectrum.data();
fOut = sbImpulseResponse.data();
ifft.execute( fIn, fOut );
sbImpulseResponse.div_scalar( float( sbImpulseResponse.length() ) );
pNewFilterR->load( sbImpulseResponse.data(), sbImpulseResponse.length() );
pConvolverR->exchangeFilter( pNewFilterR );
pNewFilterR->release();
pNewFilterR->Load( sbImpulseResponse.data(), sbImpulseResponse.length() );
pConvolverR->ExchangeFilter( pNewFilterR );
pNewFilterR->Release();
}
return;
......@@ -137,8 +137,8 @@ void ITANCTCStreamFilter::SetGains( const std::vector< float >& vfGains, bool bS
ITAUPConvolution* pConvolverR( m_vpConvolvers[iIdxRight] );
const float& fGain( vfGains[n] );
pConvolverL->setGain( fGain, bSetImmediately );
pConvolverR->setGain( fGain, bSetImmediately );
pConvolverL->SetGain( fGain, bSetImmediately );
pConvolverR->SetGain( fGain, bSetImmediately );
}
}
......@@ -162,15 +162,15 @@ void ITANCTCStreamFilter::HandleProcessStream( ITADatasourceRealization*, const
ITAUPConvolution* pConvolverL( m_vpConvolvers[iIdxLeft] );
ITAUPConvolution* pConvolverR( m_vpConvolvers[iIdxRight] );
pConvolverL->process( pfInputDataCh0, oConfig.iBlockLength, pfOutputData, oConfig.iBlockLength, ITAUPConvolution::OUTPUT_OVERWRITE );
pConvolverR->process( pfInputDataCh1, oConfig.iBlockLength, pfOutputData, oConfig.iBlockLength, ITAUPConvolution::OUTPUT_MIX );
pConvolverL->Process( pfInputDataCh0, oConfig.iBlockLength, pfOutputData, oConfig.iBlockLength, ITAUPConvolution::OUTPUT_OVERWRITE );
pConvolverR->Process( pfInputDataCh1, oConfig.iBlockLength, pfOutputData, oConfig.iBlockLength, ITAUPConvolution::OUTPUT_MIX );
}
// Increment write pointer on output stream
m_pdsOutput->IncrementWritePointer();
}
void ITANCTCStreamFilter::HandlePostIncrementBlockPointer( ITADatasourceRealization* pSender )
void ITANCTCStreamFilter::HandlePostIncrementBlockPointer( ITADatasourceRealization* )
{
m_pdsInput->IncrementBlockPointer();
}
\ No newline at end of file
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