Commit 773f12ce authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Compile clean for all renderer and reproductions

parent 34d6549b
......@@ -118,18 +118,18 @@ public:
CDirectivityState oDirectivityStateCur; //!< Aktueller Status der Richtcharakteristik
CDirectivityState oDirectivityStateNew; //!< Neuer Status der Richtcharakteristik
CITAThirdOctaveMagnitudeSpectrum oDirectivityMagnitudes; //!< Magnitudes for directivity
CITAThirdOctaveGainMagnitudeSpectrum oDirectivityMagnitudes; //!< Magnitudes for directivity
CHRIRState oHRIRStateCur; //!< Aktueller Status der HRIR
CHRIRState oHRIRStateNew; //!< Neuer Status der HRIR
CVAAtmosphericTemporalVariantions oATVGenerator; //!< Generator for temporal variation magnitudes of the time signal by medium shifts during propagation
CITAThirdOctaveMagnitudeSpectrum oTemporalVariationMagnitudes; //!< Magnitudes for temporal variation of the time signal by medium shifts during propagation
CITAThirdOctaveGainMagnitudeSpectrum oTemporalVariationMagnitudes; //!< Magnitudes for temporal variation of the time signal by medium shifts during propagation
CITAThirdOctaveMagnitudeSpectrum oAirAttenuationMagnitudes; //!< Magnitudes for air attenuation (damping)
CITAThirdOctaveGainMagnitudeSpectrum oAirAttenuationMagnitudes; //!< Magnitudes for air attenuation (damping)
CITAThirdOctaveFilterbank* pThirdOctaveFilterBank; //!< DSP-Element zur Filterung von Third-Octave Datenstzen der Richtcharakteristik
CITAThirdOctaveMagnitudeSpectrum oThirdOctaveFilterMagnitudes; //!< DSP magnitudes (third octave band resolution)
CITAThirdOctaveGainMagnitudeSpectrum oThirdOctaveFilterMagnitudes; //!< DSP magnitudes (third octave band resolution)
CITAVariableDelayLine* pVariableDelayLine; //!< DSP-Element zur Bercksichtigung der Mediumsausbreitung in instationren Schallfeldern (inkl. Doppler-Effekt, falls aktiviert)
......@@ -1270,7 +1270,7 @@ void CVABATNSoundPath::UpdateDir( bool bDIRAuraModeEnabled )
std::vector< float > vfGains( CITAThirdOctaveMagnitudeSpectrum::GetNumBands() );
pDirectivityDataNew->getMagnitudes( oDirSoundPath.oDirectivityStateNew.iRecord, 0, &vfGains[ 0 ] );
CITAThirdOctaveMagnitudeSpectrum oDirectivityMagnitudes;
CITAThirdOctaveGainMagnitudeSpectrum oDirectivityMagnitudes;
oDirectivityMagnitudes.SetMagnitudes( vfGains );
oDirSoundPath.pThirdOctaveFilterBank->SetMagnitudes( oDirectivityMagnitudes );
}
......@@ -1317,7 +1317,7 @@ void CVABATNSoundPath::UpdateDir( bool bDIRAuraModeEnabled )
std::vector< float > vfGains( CITAThirdOctaveMagnitudeSpectrum::GetNumBands() );
pDirectivityDataNew->getMagnitudes( oRefSoundPath.oDirectivityStateNew.iRecord, 0, &vfGains[ 0 ] );
CITAThirdOctaveMagnitudeSpectrum oDirectivityMagnitudes;
CITAThirdOctaveGainMagnitudeSpectrum oDirectivityMagnitudes;
oDirectivityMagnitudes.SetMagnitudes( vfGains );
oRefSoundPath.pThirdOctaveFilterBank->SetMagnitudes( oDirectivityMagnitudes );
}
......
......@@ -1199,7 +1199,7 @@ void CVABFFSoundPath::UpdateDir( bool bDIRAuraModeEnabled )
{
std::vector< float > vfMags( CITAThirdOctaveMagnitudeSpectrum::GetNumBands() );
pDirectivityDataNew->getMagnitudes( oDirectivityStateNew.iRecord, 0, &vfMags[ 0 ] );
CITAThirdOctaveMagnitudeSpectrum oDirectivityMagnitudes;
CITAThirdOctaveGainMagnitudeSpectrum oDirectivityMagnitudes;
oDirectivityMagnitudes.SetMagnitudes( vfMags );
pThirdOctaveFilterBank->SetMagnitudes( oDirectivityMagnitudes );
}
......
......@@ -464,9 +464,9 @@ public:
HRIRState oHRIRStateCur; //!< Aktueller Status der HRIR
HRIRState oHRIRStateNew; //!< Neuer Status der HRIR
CITAThirdOctaveMagnitudeSpectrum oMagsSumCur; //!< Aktuelle Zusammensetzung des zusammengesetzten TO-Datensatzes (DIR, AA)
CITAThirdOctaveMagnitudeSpectrum oAirAbsMags; //!< Aktualle Zusammensetzung des TO-Datensatzes fr Luftschallabsorption
CITAThirdOctaveMagnitudeSpectrum oDirMags; //!< Aktualle Zusammensetzung des TO-Datensatzes fr Luftschallabsorption
CITAThirdOctaveGainMagnitudeSpectrum oMagsSumCur; //!< Aktuelle Zusammensetzung des zusammengesetzten TO-Datensatzes (DIR, AA)
CITAThirdOctaveGainMagnitudeSpectrum oAirAbsMags; //!< Aktualle Zusammensetzung des TO-Datensatzes fr Luftschallabsorption
CITAThirdOctaveGainMagnitudeSpectrum oDirMags; //!< Aktualle Zusammensetzung des TO-Datensatzes fr Luftschallabsorption
unsigned long int uiID; //!< Unique Identifier fr diesen Task
......@@ -647,7 +647,7 @@ void ComplexSoundPath::UpdateDirectSound( const bool bDirectSoundAudible )
// Neue Luftschallabsorption Mags holen (oAirAbsMags)
UpdateAirAbsorption();
CITAThirdOctaveMagnitudeSpectrum oMagsSumNew;
CITAThirdOctaveGainMagnitudeSpectrum oMagsSumNew;
oMagsSumNew.SetIdentity();
if( iPathAuralizationMode & IVACore::VA_AURAMODE_DIRECTIVITY )
......
......@@ -1128,7 +1128,7 @@ void CVAMFFSoundPath::UpdateDir( bool bDIRAuraModeEnabled )
pDirectivityDataNew->getNearestNeighbour( DAFF_OBJECT_VIEW, float( oRelations.dAzimuthS2L ), float( oRelations.dElevationS2L ), oDirectivityStateNew.iRecord );
if( oDirectivityStateCur.iRecord != oDirectivityStateNew.iRecord )
{
CITAThirdOctaveMagnitudeSpectrum oDirectivityMagnitudes;
CITAThirdOctaveGainMagnitudeSpectrum oDirectivityMagnitudes;
std::vector< float > vfMags( oDirectivityMagnitudes.GetNumBands() );
pDirectivityDataNew->getMagnitudes( oDirectivityStateNew.iRecord, 0, &vfMags[ 0 ] );
oDirectivityMagnitudes.SetMagnitudes( vfMags );
......
......@@ -7,8 +7,6 @@
#include "../../../Data/VADirectivity.h"
#include "../../../Data/VAHRIRDataset.h"
#include "../../../Filtering/VAAtmosphere.h"
#include "../../../Filtering/VAThirdOctaveFilterbank.h"
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Motion/VASampleAndHoldMotionModel.h"
......@@ -24,6 +22,7 @@
// ITA includes
#include <DAFF.h>
#include <ITANumericUtils.h>
#include <ITAUPConvolution.h>
#include <ITAUPFilter.h>
#include <ITAUPFilterPool.h>
......@@ -37,6 +36,8 @@
#include <ITASampleFrame.h>
#include <ITAStreamInfo.h>
#include <ITAFastMath.h>
#include <ITAVariableDelayLine.h>
#include <ITAThirdOctaveFilterbank.h>
// Vista includes
#include <VistaInterProcComm/Concurrency/VistaThreadEvent.h>
......@@ -122,7 +123,7 @@ public:
ITAAtomicBool bDelete;
CVAThirdOctaveFilterbank* pThirdOctaveFilterBank;
CITAThirdOctaveFilterbank* pThirdOctaveFilterBank;
CITAVariableDelayLine* pVariableDelayLine;
ITAUPConvolution* pFIRConvolverChL1;
ITAUPConvolution* pFIRConvolverChL2;
......@@ -1184,8 +1185,8 @@ CVAPTHASoundPath::CVAPTHASoundPath( double dSamplerate, int iBlocklength, int iH
if( m_viHARTFInputChannels[ i ] > m_iMaxDaffChannelNumber )
m_iMaxDaffChannelNumber = m_viHARTFInputChannels[ i ];
pThirdOctaveFilterBank = CVAThirdOctaveFilterbank::Create( dSamplerate, iBlocklength,
CVAThirdOctaveFilterbank::FIR_SPLINE_LINEAR_PHASE );
pThirdOctaveFilterBank = CITAThirdOctaveFilterbank::Create( dSamplerate, iBlocklength,
CITAThirdOctaveFilterbank::FIR_SPLINE_LINEAR_PHASE );
//CVAThirdOctaveFilterbank::IIR_BIQUADS_ORDER10);
pThirdOctaveFilterBank->SetIdentity();
......@@ -1281,9 +1282,12 @@ void CVAPTHASoundPath::UpdateDir( bool bDIRAuraModeEnabled )
pDirectivityDataNew->getNearestNeighbour( DAFF_OBJECT_VIEW, float( oRelations.dAzimuthS2L ), float( oRelations.dElevationS2L ), oDirectivityStateNew.iRecord );
if( oDirectivityStateCur.iRecord != oDirectivityStateNew.iRecord )
{
CVAThirdOctaveMagnitudes oDirectivityMagnitudes;
pDirectivityDataNew->getMagnitudes( oDirectivityStateNew.iRecord, 0, oDirectivityMagnitudes.fGains );
pThirdOctaveFilterBank->SetGains( oDirectivityMagnitudes );
std::vector< float > vfMags( CITAThirdOctaveMagnitudeSpectrum::GetNumBands() );
pDirectivityDataNew->getMagnitudes( oDirectivityStateNew.iRecord, 0, &vfMags[ 0 ] );
CITAThirdOctaveGainMagnitudeSpectrum oDirectivityMagnitudes;
oDirectivityMagnitudes.SetMagnitudes( vfMags );
pThirdOctaveFilterBank->SetMagnitudes( oDirectivityMagnitudes );
}
}
}
......
......@@ -28,7 +28,6 @@
#if ( VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID == 1 )
// VA includes
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Motion/VASampleAndHoldMotionModel.h"
......
......@@ -28,7 +28,6 @@
#if ( VACORE_WITH_RENDERER_VBAP_FREE_FIELD == 1 )
// VA includes
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VASampleAndHoldMotionModel.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Rendering/VAAudioRenderer.h"
......@@ -46,6 +45,7 @@
// Vista includes
#include <VistaBase/VistaVector3D.h>
#include <VistaMath/VistaGeometries.h>
// STL Includes
#include <list>
......@@ -134,7 +134,7 @@ private:
public:
int iIdentifier;
std::vector <int> iLSIdentifier;
VistaVector3D Polygon;
VistaPolygon Polygon;
};
class SoundPath
......
......@@ -182,10 +182,8 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene( CVASceneState* pNewS
// Re-init temp buffer to match with current HRIR length
int iHRIRFilterLength = pHRIRSet->GetProperties()->iFilterLength;
if( m_sfHRIRTemp.length() != iHRIRFilterLength )
{
double dSampleRate = m_oParams.pCore->GetCoreConfig()->oAudioDriverConfig.dSampleRate;
m_sfHRIRTemp.init( 2, iHRIRFilterLength, false );
}
int iIndex;
pHRIRSet->GetNearestNeighbour( float( dAzimuth ), float( dElevation ), &iIndex );
......@@ -200,17 +198,17 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene( CVASceneState* pNewS
ITAUPFilter* pFilterChR = m_pdsStreamFilter->pFilterPool->RequestFilter();
int iLoadFilter = (std::min)( m_iHRIRFilterLength, iHRIRFilterLength );
pFilterChL->zeros();
pFilterChL->load( m_sfHRIRTemp[0].data(), iLoadFilter );
pFilterChR->zeros();
pFilterChR->load( m_sfHRIRTemp[1].data(), iLoadFilter );
pFilterChL->Zeros();
pFilterChL->Load( m_sfHRIRTemp[0].data(), iLoadFilter );
pFilterChR->Zeros();
pFilterChR->Load( m_sfHRIRTemp[1].data(), iLoadFilter );
// Update
m_pdsStreamFilter->vpConvolver[iIndexLeft]->ExchangeFilter( pFilterChL );
m_pdsStreamFilter->vpConvolver[iIndexRight]->ExchangeFilter( pFilterChR );
pFilterChL->release();
pFilterChR->release();
pFilterChL->Release();
pFilterChR->Release();
}
m_pdsStreamFilter->pTrigger->trigger();
......@@ -234,15 +232,15 @@ CMixdownStreamFilter::CMixdownStreamFilter( int iNumLoudspeaker, double dSampleR
for( int i=0; i< 2 * iNumLoudspeaker; i++ )
{
ITAUPConvolution* pConvolver = new ITAUPConvolution( (int) GetBlocklength(), iMaxFilterLength, pFilterPool );
pConvolver->setFilterExchangeTrigger( pTrigger );
pConvolver->setFilterExchangeMode( ITAUPConvolution::CROSSFADE_COSINE_SQUARE );
pConvolver->setFilterCrossfadeLength( (int) GetBlocklength() );
pConvolver->SetFilterExchangeTrigger( pTrigger );
pConvolver->SetFilterExchangeMode( ITAUPConvolution::CROSSFADE_COSINE_SQUARE );
pConvolver->SetFilterCrossfadeLength( (int) GetBlocklength() );
pConvolver->ExchangeFilter( pDirac );
vpConvolver.push_back( pConvolver );
}
pDirac->release();
pDirac->Release();
pTrigger->trigger();
}
......@@ -268,8 +266,8 @@ void CMixdownStreamFilter::ProcessStream( const ITAStreamInfo* pStreamInfo )
int iIndexRight = 2*i+1;
const float* pfInputData = pdsInput->GetBlockPointer( i, pStreamInfo );
int iWriteMode = ( i == 0 ) ? ITAUPConvolution::OUTPUT_OVERWRITE : ITAUPConvolution::OUTPUT_MIX;
vpConvolver[iIndexLeft]->process( pfInputData, pfBinauralOutputDataChL, iWriteMode );
vpConvolver[iIndexRight]->process( pfInputData, pfBinauralOutputDataChR, iWriteMode );
vpConvolver[iIndexLeft]->Process( pfInputData, pfBinauralOutputDataChL, iWriteMode );
vpConvolver[iIndexRight]->Process( pfInputData, pfBinauralOutputDataChR, iWriteMode );
}
IncrementWritePointer();
......
......@@ -150,7 +150,6 @@ void CVABinauralMixdownReproduction::UpdateScene( CVASceneState* pNewState )
int iHRIRFilterLength = pHRIRSet->GetProperties()->iFilterLength;
if( m_sfHRIRTemp.length() != iHRIRFilterLength )
{
double dSampleRate = m_oParams.pCore->GetCoreConfig()->oAudioDriverConfig.dSampleRate;
m_sfHRIRTemp.init( 2, iHRIRFilterLength, false );
}
int iIndex;
......@@ -167,17 +166,17 @@ void CVABinauralMixdownReproduction::UpdateScene( CVASceneState* pNewState )
ITAUPFilter* pFilterChR = m_pdsStreamFilter->pFilterPool->RequestFilter();
int iLoadFilter = (std::min)( m_iHRIRFilterLength, iHRIRFilterLength );
pFilterChL->zeros();
pFilterChL->load( m_sfHRIRTemp[0].data(), iLoadFilter );
pFilterChR->zeros();
pFilterChR->load( m_sfHRIRTemp[1].data(), iLoadFilter );
pFilterChL->Zeros();
pFilterChL->Load( m_sfHRIRTemp[0].data(), iLoadFilter );
pFilterChR->Zeros();
pFilterChR->Load( m_sfHRIRTemp[1].data(), iLoadFilter );
// Update
m_pdsStreamFilter->vpConvolver[iIndexLeft]->ExchangeFilter( pFilterChL );
m_pdsStreamFilter->vpConvolver[iIndexRight]->ExchangeFilter( pFilterChR );
pFilterChL->release();
pFilterChR->release();
pFilterChL->Release();
pFilterChR->Release();
}
m_pdsStreamFilter->pTrigger->trigger();
......@@ -207,9 +206,9 @@ StreamFilter::StreamFilter( int iNumChannels, double dSampleRate, int iBlockLeng
for( int i=0; i<2*iNumChannels; i++ )
{
ITAUPConvolution* pConvolver = new ITAUPConvolution( (int) GetBlocklength(), iMaxFilterLength, pFilterPool );
pConvolver->setFilterExchangeTrigger( pTrigger );
pConvolver->setFilterExchangeMode( ITAUPConvolution::CROSSFADE_COSINE_SQUARE );
pConvolver->setFilterCrossfadeLength( (int) GetBlocklength() );
pConvolver->SetFilterExchangeTrigger( pTrigger );
pConvolver->SetFilterExchangeMode( ITAUPConvolution::CROSSFADE_COSINE_SQUARE );
pConvolver->SetFilterCrossfadeLength( (int) GetBlocklength() );
pConvolver->ExchangeFilter( pDirac );
vpConvolver.push_back( pConvolver );
......@@ -238,8 +237,8 @@ void StreamFilter::ProcessStream( const ITAStreamInfo* pStreamInfo )
int iIndexRight = 2*i+1;
const float* pfInputData = pdsInput->GetBlockPointer( i, pStreamInfo );
int iWriteMode = ( i == 0 ) ? ITAUPConvolution::OUTPUT_OVERWRITE : ITAUPConvolution::OUTPUT_MIX;
vpConvolver[iIndexLeft]->process( pfInputData, pfBinauralOutputDataChL, iWriteMode );
vpConvolver[iIndexRight]->process( pfInputData, pfBinauralOutputDataChR, iWriteMode );
vpConvolver[iIndexLeft]->Process( pfInputData, pfBinauralOutputDataChL, iWriteMode );
vpConvolver[iIndexRight]->Process( pfInputData, pfBinauralOutputDataChR, iWriteMode );
}
IncrementWritePointer();
......
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