Commit 3fd15fa0 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Compile clean after moving DSP components to ITADSP project

parent a70e734b
#include "VAMachineSignalSource.h"
#include "../Filtering/VAVariableDelayLine.h"
#include "../VAAudiostreamTracker.h"
#include "../VACoreImpl.h"
#include "../VALog.h"
......@@ -11,6 +10,7 @@
#include <ITAFade.h>
#include <ITAFileSystemUtils.h>
#include <ITASampleFrame.h>
#include <ITAInterpolation.h>
#include <sstream>
#include <assert.h>
......@@ -39,9 +39,9 @@ CVAMachineSignalSource::CVAMachineSignalSource( const CVAMachineSignalSource::Co
m_bStartSoundNew = m_bIdleSoundNew = m_bStopSoundNew = false;
if( m_oConfig.bUseSplineInterpolation )
m_pInterpRoutine = new CVACubicSplineInterpolation;
m_pInterpRoutine = new CITASampleCubicSplineInterpolation;
else
m_pInterpRoutine = new CVALinearInterpolation;
m_pInterpRoutine = new CITASampleLinearInterpolation;
int iLeft, iRight;
m_pInterpRoutine->GetOverlapSamples( iLeft, iRight );
......
......@@ -9,7 +9,7 @@
#include <ITAAtomicPrimitives.h>
class CVACoreImpl;
class IVAInterpolationRoutine;
class IITASampleInterpolationRoutine;
/** Machine signal source
*
......@@ -146,7 +146,7 @@ private:
int m_iIdlingSoundCursor;
int m_iStoppingSoundCursor;
IVAInterpolationRoutine* m_pInterpRoutine;
IITASampleInterpolationRoutine* m_pInterpRoutine;
std::string GetMachineStateString( MachineState ) const;
void AddSamplesStarting( ITASampleBuffer&, int&, bool& );
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
#ifndef __VA_ATMOSPHERE__
#define __VA_ATMOSPHERE__
#include "ITAThirdOctaveMagnitudeSpectrum.h"
#include <ITAThirdOctaveMagnitudeSpectrum.h>
//! Luftschall-Dmpfungsfaktoren in Terzen berechnen (nach ISO 9613-1:1993)
// (ACHTUNG: Andere Bedeutung als in Raven: Dmpfungsfaktoren! 1=>Keine Dmpfung)
......
......@@ -16,19 +16,19 @@ set( DirFiles
#VAFreefieldFilterGenerator.cpp
#VAFreefieldFilterGenerator.h
VATemporalVariations.h
VAThirdOctaveFIRFilterGenerator.cpp
VAThirdOctaveFIRFilterGenerator.h
#VAThirdOctaveFIRFilterGenerator.cpp
#VAThirdOctaveFIRFilterGenerator.h
#VAThirdOctaveFilterbank.cpp
VAThirdOctaveFilterbank.h
VAThirdOctaveFilterbankCoefficients.h
#VAThirdOctaveFilterbank.h
#VAThirdOctaveFilterbankCoefficients.h
#VAThirdOctaveFilterbankFIR.cpp
VAThirdOctaveFilterbankFIR.h
VAThirdOctaveFilterbankIIR.cpp
VAThirdOctaveFilterbankIIR.h
#VAThirdOctaveFilterbankFIR.h
#VAThirdOctaveFilterbankIIR.cpp
#VAThirdOctaveFilterbankIIR.h
#VAThirdOctaveMagnitudes.cpp
#VAThirdOctaveMagnitudes.h
VAVariableDelayLine.cpp
VAVariableDelayLine.h
#VAVariableDelayLine.cpp
#VAVariableDelayLine.h
_SourceFiles.cmake
)
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
......
......@@ -28,7 +28,6 @@
#if ( VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD == 1 )
// VA includes
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VASampleAndHoldMotionModel.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../VAAudioRenderer.h"
......@@ -42,6 +41,7 @@
// ITA includes
#include <ITADataSourceRealization.h>
#include <ITAVariableDelayLine.h>
#include <ITASampleBuffer.h>
// STL Includes
......
......@@ -12,8 +12,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"
......@@ -30,6 +28,7 @@
#include <ITAUPFilter.h>
#include <ITAUPFilterPool.h>
#include <ITAAtomicPrimitives.h>
#include <ITAThirdOctaveFilterbank.h>
#include <ITAClock.h>
#include <ITACriticalSection.h>
//#include <ITAConfigUtils.h>
......@@ -129,10 +128,10 @@ public:
CITAThirdOctaveMagnitudeSpectrum oAirAttenuationMagnitudes; //!< Magnitudes for air attenuation (damping)
CVAThirdOctaveFilterbank* pThirdOctaveFilterBank; //!< DSP-Element zur Filterung von Third-Octave Datenstzen der Richtcharakteristik
CITAThirdOctaveFilterbank* pThirdOctaveFilterBank; //!< DSP-Element zur Filterung von Third-Octave Datenstzen der Richtcharakteristik
CITAThirdOctaveMagnitudeSpectrum oThirdOctaveFilterMagnitudes; //!< DSP magnitudes (third octave band resolution)
CVAVariableDelayLine* pVariableDelayLine; //!< DSP-Element zur Bercksichtigung der Mediumsausbreitung in instationren Schallfeldern (inkl. Doppler-Effekt, falls aktiviert)
CITAVariableDelayLine* pVariableDelayLine; //!< DSP-Element zur Bercksichtigung der Mediumsausbreitung in instationren Schallfeldern (inkl. Doppler-Effekt, falls aktiviert)
ITAUPConvolution* pFIRConvolverChL; //!< DSP-Element zur Faltung mit der Kopfbezogenen bertragungsfunktion im Zeitbereich (HRIR) - Links
ITAUPConvolution* pFIRConvolverChR; //!< DSP-Element zur Faltung mit der Kopfbezogenen bertragungsfunktion im Zeitbereich (HRIR) - Rechts
......@@ -325,15 +324,15 @@ void CVABinauralAirTrafficNoiseAudioRenderer::Init( const CVAStruct& oArgs )
sVLDInterpolationAlgorithm = toLowercase( sVLDInterpolationAlgorithm );
if( sVLDInterpolationAlgorithm == "switch" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::SWITCH;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::SWITCH;
else if( sVLDInterpolationAlgorithm == "crossfade" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CROSSFADE;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CROSSFADE;
else if( sVLDInterpolationAlgorithm == "linear" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::LINEAR_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::LINEAR_INTERPOLATION;
else if( sVLDInterpolationAlgorithm == "cubicspline" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
else if( sVLDInterpolationAlgorithm == "windowedsinc" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::WINDOWED_SINC_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::WINDOWED_SINC_INTERPOLATION;
else
ITA_EXCEPT1( INVALID_PARAMETER, "Unrecognized interpolation algorithm '" + sVLDInterpolationAlgorithm + "' in BinauralFreefieldAudioRendererConfig" );
......@@ -711,12 +710,12 @@ void CVABinauralAirTrafficNoiseAudioRenderer::ProcessStream( const ITAStreamInfo
bool bDPEnabledGlobal = ( m_iCurGlobalAuralizationMode & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledListener = ( pListenerState->GetAuralizationMode() & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledSource = ( pSourceState->GetAuralizationMode() & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledCurrent = ( pPath->oDirSoundPath.pVariableDelayLine->GetAlgorithm() != CVAVariableDelayLine::SWITCH ); // switch = disabled
bool bDPEnabledCurrent = ( pPath->oDirSoundPath.pVariableDelayLine->GetAlgorithm() != CITAVariableDelayLine::SWITCH ); // switch = disabled
bool bDPStatusChanged = ( bDPEnabledCurrent != ( bDPEnabledGlobal && bDPEnabledListener && bDPEnabledSource ) );
if( bDPStatusChanged )
{
pPath->oDirSoundPath.pVariableDelayLine->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CVAVariableDelayLine::SWITCH );
pPath->oRefSoundPath.pVariableDelayLine->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CVAVariableDelayLine::SWITCH );
pPath->oDirSoundPath.pVariableDelayLine->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CITAVariableDelayLine::SWITCH );
pPath->oRefSoundPath.pVariableDelayLine->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CITAVariableDelayLine::SWITCH );
}
pPath->UpdateMediumPropagation( m_dSpeedOfSound );
......@@ -1163,19 +1162,19 @@ void CVABinauralAirTrafficNoiseAudioRenderer::UpdateGlobalAuralizationMode( int
CVABATNSoundPath::CVABATNSoundPath( double dSamplerate, int iBlocklength, int iHRIRFilterLength, int iDirFilterLength )
: dGroundReflectionPlanePosition( 0 )
{
oDirSoundPath.pThirdOctaveFilterBank = CVAThirdOctaveFilterbank::Create( dSamplerate, iBlocklength,
oDirSoundPath.pThirdOctaveFilterBank = CITAThirdOctaveFilterbank::Create( dSamplerate, iBlocklength,
//CVAThirdOctaveFilterbank::FIR_SPLINE_LINEAR_PHASE);
CVAThirdOctaveFilterbank::IIR_BIQUADS_ORDER10 );
oRefSoundPath.pThirdOctaveFilterBank = CVAThirdOctaveFilterbank::Create( dSamplerate, iBlocklength,
CITAThirdOctaveFilterbank::IIR_BIQUADS_ORDER10 );
oRefSoundPath.pThirdOctaveFilterBank = CITAThirdOctaveFilterbank::Create( dSamplerate, iBlocklength,
//CVAThirdOctaveFilterbank::FIR_SPLINE_LINEAR_PHASE);
CVAThirdOctaveFilterbank::IIR_BIQUADS_ORDER10 );
CITAThirdOctaveFilterbank::IIR_BIQUADS_ORDER10 );
oDirSoundPath.pThirdOctaveFilterBank->SetIdentity();
oRefSoundPath.pThirdOctaveFilterBank->SetIdentity();
float fReserverdMaxDelaySamples = (float) ( 3 * dSamplerate ); // 3 Sekunden ~ 1km Entfernung
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
oDirSoundPath.pVariableDelayLine = new CVAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm);
oRefSoundPath.pVariableDelayLine = new CVAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm);
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
oDirSoundPath.pVariableDelayLine = new CITAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm );
oRefSoundPath.pVariableDelayLine = new CITAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm );
oDirSoundPath.pFIRConvolverChL = new ITAUPConvolution( iBlocklength, iHRIRFilterLength );
oRefSoundPath.pFIRConvolverChL = new ITAUPConvolution( iBlocklength, iHRIRFilterLength );
......
......@@ -31,7 +31,6 @@
#include <VACore.h>
#include <VAObjectPool.h>
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Rendering/VAAudioRenderer.h"
......@@ -43,6 +42,7 @@
// ITA includes
#include <ITADataSourceRealization.h>
#include <ITASampleBuffer.h>
#include <ITAVariableDelayLine.h>
// 3rdParty includes
#include <tbb/concurrent_queue.h>
......
......@@ -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 "../../../Scene/VAScene.h"
......@@ -26,6 +24,8 @@
#include <ITAUPFilter.h>
#include <ITAUPFilterPool.h>
#include <ITAAtomicPrimitives.h>
#include <ITAVariableDelayLine.h>
#include <ITAThirdOctaveFilterbank.h>
#include <ITAClock.h>
#include <ITACriticalSection.h>
#include <ITAConstants.h>
......@@ -69,7 +69,7 @@ public:
CVASourceListenerMetrics oRelations; //!< Positions, orientations
CVAVariableDelayLine* pVariableDelayLine; //!< DSP
CITAVariableDelayLine* pVariableDelayLine; //!< DSP
ITAAtomicBool bMarkedForDeletion;
......@@ -255,15 +255,15 @@ void CVABinauralArtificialReverbAudioRenderer::Init( const CVAStruct& oArgs )
sVLDInterpolationAlgorithm = toLowercase( sVLDInterpolationAlgorithm );
if( sVLDInterpolationAlgorithm == "switch" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::SWITCH;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::SWITCH;
else if( sVLDInterpolationAlgorithm == "crossfade" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CROSSFADE;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CROSSFADE;
else if( sVLDInterpolationAlgorithm == "linear" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::LINEAR_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::LINEAR_INTERPOLATION;
else if( sVLDInterpolationAlgorithm == "cubicspline" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
else if( sVLDInterpolationAlgorithm == "windowedsinc" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::WINDOWED_SINC_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::WINDOWED_SINC_INTERPOLATION;
else
ITA_EXCEPT1( INVALID_PARAMETER, "Unrecognized interpolation algorithm '" + sVLDInterpolationAlgorithm + "' in BinauralFreefieldAudioRendererConfig" );
......@@ -761,10 +761,10 @@ void CVABinauralArtificialReverbAudioRenderer::ProcessStream( const ITAStreamInf
bool bDPEnabledGlobal = ( m_iCurGlobalAuralizationMode & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledListener = ( pListenerState->GetAuralizationMode() & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledSource = ( pSourceState->GetAuralizationMode() & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledCurrent = ( pPath->pVariableDelayLine->GetAlgorithm() != CVAVariableDelayLine::SWITCH ); // switch = disabled
bool bDPEnabledCurrent = ( pPath->pVariableDelayLine->GetAlgorithm() != CITAVariableDelayLine::SWITCH ); // switch = disabled
bool bDPStatusChanged = ( bDPEnabledCurrent != ( bDPEnabledGlobal && bDPEnabledListener && bDPEnabledSource ) );
if( bDPStatusChanged )
pPath->pVariableDelayLine->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CVAVariableDelayLine::SWITCH );
pPath->pVariableDelayLine->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CITAVariableDelayLine::SWITCH );
// Artificial reverb (don't trigger AR update, but mark for update)
......@@ -1437,8 +1437,8 @@ void CVABinauralArtificialReverbAudioRenderer::UpdateArtificialReverbFilter( Lis
CBARPath::CBARPath( double dSamplerate, int iBlocklength )
{
float fReserverdMaxDelaySamples = ( float ) ( 3 * dSamplerate ); // 3 seconds ~ 1km initial distance
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
pVariableDelayLine = new CVAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm );
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
pVariableDelayLine = new CITAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm );
return;
}
......
......@@ -33,7 +33,6 @@
#include <VAObject.h>
#include <VAObjectPool.h>
#include "../../../VASourceListenerMetrics.h"
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../VAAudioRenderer.h"
......
......@@ -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"
......@@ -31,12 +29,15 @@
#include <ITAClock.h>
#include <ITACriticalSection.h>
#include <ITADataSourceRealization.h>
#include <ITAThirdOctaveFilterbank.h>
#include <ITAVariableDelayLine.h>
#include <ITASampleBuffer.h>
#include <ITAStopWatch.h>
#include <ITASampleFrame.h>
#include <ITAStreamInfo.h>
#include <ITAFastMath.h>
#include <ITAConstants.h>
#include <ITANumericUtils.h>
// Vista includes
#include <VistaInterProcComm/Concurrency/VistaThreadEvent.h>
......@@ -122,9 +123,9 @@ public:
ITAAtomicBool bDelete;
CVAThirdOctaveFilterbank* pThirdOctaveFilterBank;
CVAVariableDelayLine* pVariableDelayLineChL;
CVAVariableDelayLine* pVariableDelayLineChR;
CITAThirdOctaveFilterbank* pThirdOctaveFilterBank;
CITAVariableDelayLine* pVariableDelayLineChL;
CITAVariableDelayLine* pVariableDelayLineChR;
ITAUPConvolution* pFIRConvolverChL;
ITAUPConvolution* pFIRConvolverChR;
......@@ -290,15 +291,15 @@ void CVABinauralFreeFieldAudioRenderer::Init( const CVAStruct& oArgs )
sVLDInterpolationAlgorithm = toLowercase( sVLDInterpolationAlgorithm );
if( sVLDInterpolationAlgorithm == "switch" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::SWITCH;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::SWITCH;
else if( sVLDInterpolationAlgorithm == "crossfade" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CROSSFADE;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CROSSFADE;
else if( sVLDInterpolationAlgorithm == "linear" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::LINEAR_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::LINEAR_INTERPOLATION;
else if( sVLDInterpolationAlgorithm == "cubicspline" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
else if( sVLDInterpolationAlgorithm == "windowedsinc" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::WINDOWED_SINC_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::WINDOWED_SINC_INTERPOLATION;
else
ITA_EXCEPT1( INVALID_PARAMETER, "Unrecognized interpolation algorithm '" + sVLDInterpolationAlgorithm + "' in BinauralFreefieldAudioRendererConfig" );
......@@ -686,12 +687,12 @@ void CVABinauralFreeFieldAudioRenderer::ProcessStream( const ITAStreamInfo* pStr
bool bDPEnabledGlobal = ( m_iCurGlobalAuralizationMode & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledListener = ( pListenerState->GetAuralizationMode() & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledSource = ( pSourceState->GetAuralizationMode() & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledCurrent = ( pPath->pVariableDelayLineChL->GetAlgorithm() != CVAVariableDelayLine::SWITCH ); // switch = disabled
bool bDPEnabledCurrent = ( pPath->pVariableDelayLineChL->GetAlgorithm() != CITAVariableDelayLine::SWITCH ); // switch = disabled
bool bDPStatusChanged = ( bDPEnabledCurrent != ( bDPEnabledGlobal && bDPEnabledListener && bDPEnabledSource ) );
if( bDPStatusChanged )
{
pPath->pVariableDelayLineChL->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CVAVariableDelayLine::SWITCH );
pPath->pVariableDelayLineChR->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CVAVariableDelayLine::SWITCH );
pPath->pVariableDelayLineChL->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CITAVariableDelayLine::SWITCH );
pPath->pVariableDelayLineChR->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CITAVariableDelayLine::SWITCH );
}
pPath->UpdateMediumPropagation( m_dSpeedOfSound, m_dAdditionalStaticDelaySeconds );
......@@ -1122,15 +1123,15 @@ void CVABinauralFreeFieldAudioRenderer::UpdateGlobalAuralizationMode( int iGloba
CVABFFSoundPath::CVABFFSoundPath( double dSamplerate, int iBlocklength, int iHRIRFilterLength, int iDirFilterLength )
{
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();
float fReserverdMaxDelaySamples = (float) ( 3 * dSamplerate ); // 3 Sekunden ~ 1km Entfernung
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
pVariableDelayLineChL = new CVAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm);
pVariableDelayLineChR = new CVAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm);
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
pVariableDelayLineChL = new CITAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm);
pVariableDelayLineChR = new CITAVariableDelayLine( dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm);
pFIRConvolverChL = new ITAUPConvolution( iBlocklength, iHRIRFilterLength );
pFIRConvolverChL->SetFilterExchangeMode( ITAUPConvolution::CROSSFADE_COSINE_SQUARE );
......@@ -1196,8 +1197,10 @@ void CVABFFSoundPath::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 );
std::vector< float > vfMags( CITAThirdOctaveMagnitudeSpectrum::GetNumBands() );
pDirectivityDataNew->getMagnitudes( oDirectivityStateNew.iRecord, 0, &vfMags[ 0 ] );
CITAThirdOctaveMagnitudeSpectrum oDirectivityMagnitudes;
oDirectivityMagnitudes.SetMagnitudes( vfMags );
pThirdOctaveFilterBank->SetGains( oDirectivityMagnitudes );
}
}
......
......@@ -27,7 +27,6 @@
#if( VACORE_WITH_RENDERER_BINAURAL_FREE_FIELD == 1 )
// VA includes
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../VAAudioRenderer.h"
......@@ -43,6 +42,7 @@
// ITA includes
#include <ITABufferedAudioFileWriter.h>
#include <ITADataSourceRealization.h>
#include <ITAVariableDelayLine.h>
#include <ITASampleFrame.h>
#include <ITAStringUtils.h>
......
......@@ -31,7 +31,6 @@
#include <VABaseDefinitions.h>
#include <VACore.h>
#include <VAObject.h>
#include "../../../Filtering/VAThirdOctaveMagnitudes.h"
#include "../../VAAudioRenderer.h"
#include "../../VAAudioRendererRegistry.h"
#include "../../../Scene/VAScene.h"
......@@ -42,6 +41,7 @@
#include <ITACriticalSection.h>
#include <ITASampleBuffer.h>
#include <ITAStopWatch.h>
#include <ITAThirdOctaveMagnitudeSpectrum.h>
// STL includes
#include <list>
......@@ -61,7 +61,7 @@ class CVALockfreeObjectPool;
class CVASceneState;
class CVASceneStateDiff;
class CVASignalSourceManager;
class CVAThirdOctaveFIRFilterGenerator;
class CITAThirdOctaveFIRFilterGenerator;
// Interne Vorwrtsdeklarationen
class CVARavenLocalScheduler;
......@@ -176,7 +176,7 @@ public:
* Die lnge der Impulsantwort entspricht der Lnge des ITASampleFrame.
* \note Reentrant (blocking wait)
*/
void GenerateIRFromTOMags( const CVAThirdOctaveMagnitudes& oMags, ITASampleBuffer& sbFilter );
void GenerateIRFromTOMags( const CITAThirdOctaveMagnitudeSpectrum& oMags, ITASampleBuffer& sbFilter );
//! Gibt die Schallmediumsgeschwindigkeit zurck [m/s]
float GetSpeedOfSound() const;
......@@ -204,7 +204,7 @@ private:
IVAObjectPool* m_pSourcePool; //!< Speichermanagement fr Quellen
IVAObjectPool* m_pListenerPool; //!< Speichermanagement fr Hrer
ITAUPFilterPool* m_pRIRFilterPool; //!< Speichermanagement fr Raumimpulsantworten/Simulationsergebnisse
CVAThirdOctaveFIRFilterGenerator* m_pThirdOctaveFIRFilterGenerator; //!< Filter-Generator fr Impulsantworten aus Terzbandsprektren
CITAThirdOctaveFIRFilterGenerator* m_pThirdOctaveFIRFilterGenerator; //!< Filter-Generator fr Impulsantworten aus Terzbandsprektren
ITACriticalSection m_csFilterGenerator; //!< Geteilte Resource "Filter-Generator" vor reentrance schtzen
......
......@@ -6,8 +6,6 @@
// VA includes
#include "../../../Data/VADirectivity.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,8 @@
// ITA includes
#include <DAFF.h>
#include <ITAAtomicPrimitives.h>
#include <ITAThirdOctaveFilterbank.h>
#include <ITAVariableDelayLine.h>
#include <ITAClock.h>
#include <ITACriticalSection.h>
#include <ITAConfigUtils.h>
......@@ -33,6 +33,7 @@
#include <ITASampleFrame.h>
#include <ITAStreamInfo.h>
#include <ITAFastMath.h>
#include <ITANumericUtils.h>
#include <ITAConstants.h>
// Vista includes
......@@ -96,8 +97,8 @@ public:
ITAAtomicBool bDelete;
CVAThirdOctaveFilterbank* pThirdOctaveFilterBank;
CVAVariableDelayLine* pVariableDelayLine;
CITAThirdOctaveFilterbank* pThirdOctaveFilterBank;
CITAVariableDelayLine* pVariableDelayLine;
float fPrevGain;
void PreRequest()
......@@ -252,15 +253,15 @@ void CVAMonauralFreeFieldAudioRenderer::Init( const CVAStruct& oArgs )
sVLDInterpolationAlgorithm = toLowercase( sVLDInterpolationAlgorithm );
if( sVLDInterpolationAlgorithm == "switch" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::SWITCH;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::SWITCH;
else if( sVLDInterpolationAlgorithm == "crossfade" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CROSSFADE;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CROSSFADE;
else if( sVLDInterpolationAlgorithm == "linear" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::LINEAR_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::LINEAR_INTERPOLATION;
else if( sVLDInterpolationAlgorithm == "cubicspline" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
else if( sVLDInterpolationAlgorithm == "windowedsinc" )
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::WINDOWED_SINC_INTERPOLATION;
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::WINDOWED_SINC_INTERPOLATION;
else
ITA_EXCEPT1( INVALID_PARAMETER, "Unrecognized interpolation algorithm '" + sVLDInterpolationAlgorithm + "' in MonauralFreefieldAudioRendererConfig" );
......@@ -651,10 +652,10 @@ void CVAMonauralFreeFieldAudioRenderer::ProcessStream( const ITAStreamInfo* pStr
bool bDPEnabledGlobal = ( m_iCurGlobalAuralizationMode & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledListener = ( pListenerState->GetAuralizationMode() & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledSource = ( pSourceState->GetAuralizationMode() & IVACore::VA_AURAMODE_DOPPLER ) > 0;
bool bDPEnabledCurrent = ( pPath->pVariableDelayLine->GetAlgorithm() != CVAVariableDelayLine::SWITCH ); // switch = disabled
bool bDPEnabledCurrent = ( pPath->pVariableDelayLine->GetAlgorithm() != CITAVariableDelayLine::SWITCH ); // switch = disabled
bool bDPStatusChanged = ( bDPEnabledCurrent != ( bDPEnabledGlobal && bDPEnabledListener && bDPEnabledSource ) );
if( bDPStatusChanged )
pPath->pVariableDelayLine->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CVAVariableDelayLine::SWITCH );
pPath->pVariableDelayLine->SetAlgorithm( !bDPEnabledCurrent ? m_iDefaultVDLSwitchingAlgorithm : CITAVariableDelayLine::SWITCH );
pPath->UpdateMediumPropagation( m_dSpeedOfSound );
// Spherical spreading loss
......@@ -1079,14 +1080,14 @@ void CVAMonauralFreeFieldAudioRenderer::UpdateGlobalAuralizationMode( int iGloba
CVAMFFSoundPath::CVAMFFSoundPath( double dSamplerate, int iBlocklength, int )
{
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();
float fReserverdMaxDelaySamples = (float) ( 3 * dSamplerate ); // 3 Sekunden ~ 1km Entfernung
m_iDefaultVDLSwitchingAlgorithm = CVAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
pVariableDelayLine = new CVAVariableDelayLine(dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm);
m_iDefaultVDLSwitchingAlgorithm = CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION;
pVariableDelayLine = new CITAVariableDelayLine(dSamplerate, iBlocklength, fReserverdMaxDelaySamples, m_iDefaultVDLSwitchingAlgorithm);
}
......@@ -1127,8 +1128,10 @@ void CVAMFFSoundPath::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 );
CITAThirdOctaveMagnitudeSpectrum oDirectivityMagnitudes;
std::vector< float > vfMags( oDirectivityMagnitudes.GetNumBands() );
pDirectivityDataNew->getMagnitudes( oDirectivityStateNew.iRecord, 0, &vfMags[ 0 ] );
oDirectivityMagnitudes.SetMagnitudes( vfMags );
pThirdOctaveFilterBank->SetGains( oDirectivityMagnitudes );
}
}
......
......@@ -27,7 +27,6 @@
#if( VACORE_WITH_RENDERER_MONAURAL_FREE_FIELD==1 )
// VA includes
#include "../../../Filtering/VAVariableDelayLine.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASharedMotionModel.h"
#include "../../VAAudioRenderer.h"
......@@ -43,6 +42,7 @@
// ITA includes
#include <ITABufferedAudioFileWriter.h>
#include <ITADataSourceRealization.h>
#include <ITAVariableDelayLine.h>
#include <ITASampleFrame.h>
// 3rdParty Includes
......
......@@ -123,7 +123,7 @@ public:
ITAAtomicBool bDelete;
CVAThirdOctaveFilterbank* pThirdOctaveFilterBank;
CVAVariableDelayLine* pVariableDelayLine;
CITAVariableDelayLine* pVariableDelayLine;
ITAUPConvolution* pFIRConvolverChL1;
ITAUPConvolution* pFIRConvolverChL2;
ITAUPConvolution* pFIRConvolverChR1;
......@@ -337,15 +337,15 @@ void CVAPTHearingAidRenderer::Init( const CVAStruct& oArgs )
sVLDInterpolationAlgorithm = toLowercase( sVLDInterpolationAlgorithm );
if( sVLDInterpolationAlgorithm == "switch" )