diff --git a/src/Rendering/Binaural/RealTime/Utils/BinauralClusterEngine/VABinauralCluster.cpp b/src/Rendering/Binaural/RealTime/Utils/BinauralClusterEngine/VABinauralCluster.cpp index 348526ec71ae67918387c1f0f91930bdfd204e10..3e2b3a6ccf1503af953c430ca83cbbc49f7de704 100644 --- a/src/Rendering/Binaural/RealTime/Utils/BinauralClusterEngine/VABinauralCluster.cpp +++ b/src/Rendering/Binaural/RealTime/Utils/BinauralClusterEngine/VABinauralCluster.cpp @@ -114,8 +114,12 @@ VABinauralCluster::getOutput() double toaSourceChL = _listener->toaEstimator->getTOALeft(sourceMetrics.phi, sourceMetrics.theta); double toSourceaChR = _listener->toaEstimator->getTOARight(sourceMetrics.phi, sourceMetrics.theta); - source->vdlChL->SetDelayTime(toaDistance + toaSourceChL - toaHRTFChL); - source->vdlChR->SetDelayTime(toaDistance + toSourceaChR - toaHRTFChR); + //source->vdlChL->SetDelayTime(toaDistance + toaSourceChL - toaHRTFChL); + //source->vdlChR->SetDelayTime(toaDistance + toSourceaChR - toaHRTFChR); + + source->vdlChL->SetDelayTime(toaDistance + toaSourceChL); + source->vdlChR->SetDelayTime(toaDistance + toSourceaChR); + source->vdlChL->Process(input, &(_tmpChL)); source->vdlChR->Process(input, &(_tmpChR)); diff --git a/src/Rendering/Binaural/RealTime/Utils/BinauralTimeOfArrivalEstimator/VABinauralTOAEstimator.cpp b/src/Rendering/Binaural/RealTime/Utils/BinauralTimeOfArrivalEstimator/VABinauralTOAEstimator.cpp index 3fef2bf9cdc2543ec9bb352993b1e37587691120..bdc79030e3ab798ac06df5def2f7af6b75ac51e9 100644 --- a/src/Rendering/Binaural/RealTime/Utils/BinauralTimeOfArrivalEstimator/VABinauralTOAEstimator.cpp +++ b/src/Rendering/Binaural/RealTime/Utils/BinauralTimeOfArrivalEstimator/VABinauralTOAEstimator.cpp @@ -3,7 +3,7 @@ #define SPEEDOFSOUND 343 #define HEADRADIUS 0.06 -#define DELAY HEADRADIUS / SPEEDOFSOUND +#define DELAY (HEADRADIUS / SPEEDOFSOUND) #include "VABinauralTOAEstimator.h" @@ -21,11 +21,11 @@ VABinauralTOAEstimator::~VABinauralTOAEstimator() double VABinauralTOAEstimator::getTOALeft(double phi, double theta) { - return DELAY * ((sin(phi) * cos(theta) / 2) + 1); + return DELAY * ((sin(phi) * cos(theta) + 1 ) / 2); } double VABinauralTOAEstimator::getTOARight(double phi, double theta) { - return DELAY * ((sin(phi - M_PI) * cos(theta) / 2) + 1); + return DELAY * ((sin(phi - M_PI) * cos(theta) + 1) / 2); }