Fixing bug in room acoustics renderer directivity handling

parent 46adba0b
......@@ -30,6 +30,7 @@
#include "../../../VASourceListenerMetrics.h"
#include "../../../directivities/VADirectivity.h"
#include "../../../directivities/VADirectivityDAFFHRIR.h"
#include "../../../directivities/VADirectivityDAFFEnergetic.h"
#include "../../../Filtering/VAAtmosphere.h"
#include "../../../Motion/VAMotionModelBase.h"
#include "../../../Motion/VASampleAndHoldMotionModel.h"
......@@ -938,10 +939,9 @@ void ComplexSoundPath::UpdateMetrics()
void ComplexSoundPath::UpdateDir()
{
// Neuen Status bestimmen
DAFFContentMS* pDirectivityData = ( DAFFContentMS* ) oDirectivityStateNew.pData;
CVADirectivityDAFFEnergetic* pDirectivityData = ( CVADirectivityDAFFEnergetic* ) oDirectivityStateNew.pData;
if( pDirectivityData != nullptr )
pDirectivityData->getNearestNeighbour( DAFF_OBJECT_VIEW,
float( oRelations.dAzimuthS2L ), float( oRelations.dElevationS2L ), oDirectivityStateNew.iRecord );
pDirectivityData->GetNearestNeighbour( float( oRelations.dAzimuthS2L ), float( oRelations.dElevationS2L ), &oDirectivityStateNew.iRecord );
else
oDirectivityStateNew.iRecord = -1;
......@@ -957,7 +957,7 @@ void ComplexSoundPath::UpdateDir()
else {
int iChannel = 0;
std::vector< float > vfMags( oDirMags.GetNumBands() );
pDirectivityData->getMagnitudes( oDirectivityStateNew.iRecord, iChannel, &vfMags[ 0 ] );
pDirectivityData->GetDAFFContent()->getMagnitudes( oDirectivityStateNew.iRecord, iChannel, &vfMags[ 0 ] );
oDirMags.SetMagnitudes( vfMags );
}
m_csTOMagsDir.leave();
......
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