Aufgrund von Umarbeiten des s3 Storage wird es in GitLab, in nächster Zeit, mögliche Performance-Einbußen geben. Näheres dazu unter: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/43/show_ticket/6670

Commit 7dda62d0 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Merge branch 'features/hato_hrtf' of https://git.rwth-aachen.de/ita/VACore into features/hato_hrtf

parents e8f961f7 6fe6e259
......@@ -23,6 +23,7 @@
#include <cassert>
#include <DAFF.h>
#include <sstream>
#include <math.h>
CVADirectivityDAFFHATOHRIR::CVADirectivityDAFFHATOHRIR( const std::string& sFilename, const std::string& sName, const double dDesiredSamplerate )
: m_sName( sName )
......@@ -167,11 +168,39 @@ void CVADirectivityDAFFHATOHRIR::GetNearestSpatialNeighbourIndex( const float fA
int CVADirectivityDAFFHATOHRIR::GetHATOChannelIndexLeft( const double dHATODeg ) const
{
// Convert index to artificial HATO index, @todo daniel
m_dHATOEndDeg;
m_dHATOStartDeg;
assert( dHATODeg <= m_dHATOEndDeg && dHATODeg >= m_dHATOStartDeg );
if ( !dHATODeg )
return 1;
int iNumHATODirections = m_pContent->getProperties()->getNumberOfChannels() / 2;
return 0; // odd! index
if (iNumHATODirections == 1)
return 1;
assert( iNumHATODirections >= 3 ); // laut Kommentar mindestens 6 HATO Channels. Falls vorher schon geprft, berflssig.
double dHATORes = ( m_dHATOEndDeg - m_dHATOStartDeg ) / ( iNumHATODirections - 1 );
double dDeviation = fmod( dHATODeg, dHATORes ); // bin nicht sicher ob math.h (fr fmod) bereits includiert, daher habe ich das oben hinzugefgt.
double dNearestHATODeg;
if ( dDeviation < ( dHATORes / 2 ) )
dNearestHATODeg = dHATODeg - dDeviation;
else
dNearestHATODeg = dHATODeg + dHATORes - dDeviation;
if ( !dNearestHATODeg )
return 1;
int iResult
if (dNearestHATODeg > 0)
iResult = (int)( ( m_dHATOEndDeg + dNearestHATODeg ) / dHATORes );
else
iResult = (int)( ( m_dHATOEndDeg + dNearestHATODeg ) / dHATORes ) + 1;
return 2 * iResult + 1; // odd! index
}
int CVADirectivityDAFFHATOHRIR::GetHATOChannelIndexRight( 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