Commit 9f7c8156 authored by Lucas Moesch's avatar Lucas Moesch

WIP

parent fd01c5fc
...@@ -114,8 +114,12 @@ VABinauralCluster::getOutput() ...@@ -114,8 +114,12 @@ VABinauralCluster::getOutput()
double toaSourceChL = _listener->toaEstimator->getTOALeft(sourceMetrics.phi, sourceMetrics.theta); double toaSourceChL = _listener->toaEstimator->getTOALeft(sourceMetrics.phi, sourceMetrics.theta);
double toSourceaChR = _listener->toaEstimator->getTOARight(sourceMetrics.phi, sourceMetrics.theta); double toSourceaChR = _listener->toaEstimator->getTOARight(sourceMetrics.phi, sourceMetrics.theta);
source->vdlChL->SetDelayTime(toaDistance + toaSourceChL - toaHRTFChL); //source->vdlChL->SetDelayTime(toaDistance + toaSourceChL - toaHRTFChL);
source->vdlChR->SetDelayTime(toaDistance + toSourceaChR - toaHRTFChR); //source->vdlChR->SetDelayTime(toaDistance + toSourceaChR - toaHRTFChR);
source->vdlChL->SetDelayTime(toaDistance + toaSourceChL);
source->vdlChR->SetDelayTime(toaDistance + toSourceaChR);
source->vdlChL->Process(input, &(_tmpChL)); source->vdlChL->Process(input, &(_tmpChL));
source->vdlChR->Process(input, &(_tmpChR)); source->vdlChR->Process(input, &(_tmpChR));
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#define SPEEDOFSOUND 343 #define SPEEDOFSOUND 343
#define HEADRADIUS 0.06 #define HEADRADIUS 0.06
#define DELAY HEADRADIUS / SPEEDOFSOUND #define DELAY (HEADRADIUS / SPEEDOFSOUND)
#include "VABinauralTOAEstimator.h" #include "VABinauralTOAEstimator.h"
...@@ -21,11 +21,11 @@ VABinauralTOAEstimator::~VABinauralTOAEstimator() ...@@ -21,11 +21,11 @@ VABinauralTOAEstimator::~VABinauralTOAEstimator()
double double
VABinauralTOAEstimator::getTOALeft(double phi, double theta) VABinauralTOAEstimator::getTOALeft(double phi, double theta)
{ {
return DELAY * ((sin(phi) * cos(theta) / 2) + 1); return DELAY * ((sin(phi) * cos(theta) + 1 ) / 2);
} }
double double
VABinauralTOAEstimator::getTOARight(double phi, double theta) 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);
} }
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