Commit 8d018705 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Merge branch 'features/hato_hrtf' into develop

parents ca5353b5 fc01c322
......@@ -55,6 +55,7 @@
// Vista includes
#include <VistaInterProcComm/Concurrency/VistaThreadEvent.h>
#include <VistaBase/VistaQuaternion.h>
// STL includes
#include <algorithm>
......@@ -736,9 +737,8 @@ void CVABinauralFreeFieldAudioRenderer::ProcessStream( const ITAStreamInfo* pStr
pPath->UpdateDir( bDIREnabled );
// HATO
const VAQuat qHATO = pListenerState->GetMotionState()->GetHeadAboveTorsoOrientation();
const double dHATODenominator = sqrt( 1 - qHATO.w * qHATO.w );
const double dHATODeg = rad2grad( dHATODenominator == 0.0f ? 0.0f : qHATO.y / dHATODenominator );
const VistaQuaternion qHATO( pListenerState->GetMotionState()->GetHeadAboveTorsoOrientation().comp );
const double dHATODeg = rad2grad( qHATO.GetAngles().b );
pPath->UpdateHRIR( pListenerState->GetAnthropometricData(), dHATODeg );
// Sound source gain / direct sound audibility via AuraMode flags
......
......@@ -202,12 +202,12 @@ int CVADirectivityDAFFHATOHRIR::GetHATOChannelIndexLeft( const double dHATODeg )
else
iResult = ( int ) ( ( m_dHATOEndDeg + dNearestHATODeg ) / dHATORes ) + 1;
return 2 * iResult; // odd! index
return 2 * iResult; // even! channel index (starting at 0)
}
int CVADirectivityDAFFHATOHRIR::GetHATOChannelIndexRight( const double dHATODeg ) const
{
return GetHATOChannelIndexLeft( dHATODeg ) + 1;
return GetHATOChannelIndexLeft(dHATODeg) + 1; // odd! channel index (indexing starts at 0, first right channels is 1)
}
void CVADirectivityDAFFHATOHRIR::GetHRIRByIndexAndHATO( ITASampleFrame* psfDest, const int iIndex, const double dHATODeg ) const
......
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