#define _USE_MATH_DEFINES #define SPEEDOFSOUND 343 #define HEADRADIUS 0.06 #define DELAY HEADRADIUS / SPEEDOFSOUND #include "VABinauralTOAEstimator.h" #include <math.h> VABinauralTOAEstimator::VABinauralTOAEstimator() { } VABinauralTOAEstimator::~VABinauralTOAEstimator() { } double VABinauralTOAEstimator::getTOALeft(double phi, double theta) { return DELAY * ((sin(phi) * cos(theta) / 2) + 1); } double VABinauralTOAEstimator::getTOARight(double phi, double theta) { return DELAY * ((sin(phi - M_PI) * cos(theta) / 2) + 1); }