Commit fc0bc2d2 authored by henryjandrew's avatar henryjandrew

added BinauralOutdoorSource header and source files, and made a few minor changes in the renderer

parent 90f87cf7
......@@ -164,7 +164,7 @@ void CVABinauralOutdoorNoiseRenderer::SetParameters(const CVAStruct& oInArgs)
}
CVAStructValue sMags = path["frequency_magnitudes"]; //
int num_values = sMags.GetDataSize() / sizeof(float); //currently only accepts third octave values, this is a safty check
int num_values = sMags.GetDataSize() / sizeof(float); //currently only accepts third octave values, this is a safety check
if (num_values != 31)
VA_EXCEPT1("CVABinauralOutdoorNoiseRenderer: Expected 31 frequency magnitudes.");
void *pvMags = sMags.GetData();
......@@ -174,10 +174,15 @@ void CVABinauralOutdoorNoiseRenderer::SetParameters(const CVAStruct& oInArgs)
for (int i = 0; i < 31; i++) {
Mags.SetMagnitude(i, pfMags[i]);
}
float test = Mags[0];
m_mPaths[path_ID]->setFilterCoefficients(Mags); //update the filter coefficients internal to the path based on the target frequency magnitudes
double delay = path["delay"];
m_mPaths[path_ID]->setDelay(delay); //update the delay for this path ********METHOD NOT YET IMPLEMENTED
m_mPaths[path_ID]->setMotion(); //update the motion of the path **********METHOD NOT YET IMPLEMENTED
//TODO: add extra "setters" for wave front delay, position/motion e.t.c
}
......
#include "VABinauralOutdoorSource.h"
CVABinauralOutdoorSource::CVABinauralOutdoorSource()
{
}
CVABinauralOutdoorSource::~CVABinauralOutdoorSource()
{
}
#ifndef IW_VACORE_BINAURAL_OUTDOOR_SOURCE
#define IW_VACORE_BINAURAL_OUTDOOR_SOURCE
#include <ITASIMOVariableDelayLine.h>
#include "../../../Motion/VASharedMotionModel.h"
#include "../../../Scene/VASoundSourceState.h"
#include "../../../Scene/VASoundSourceDesc.h"
//!
/**
* @henry:
*/
class CVABinauralOutdoorSource
{
public:
CVABinauralOutdoorSource();
~CVABinauralOutdoorSource();
CVASoundSourceState* pState;
CVASoundSourceDesc* pData;
CVASharedMotionModel* pMotionModel;
CITASIMOVariableDelayLine* pVDL;
private:
};
#endif // IW_VACORE_BINAURAL_OUTDOOR_SOURCE
......@@ -122,3 +122,15 @@ void CVABinauralOutdoorWaveFront::setFilterCoefficients(const ITABase::CThirdOct
ITADSP::IIRFilterGenerator::Burg(oIR, IIRFilterCoeffs); //using the impulse response as input, calculate the IIR filter coefficients.
}
void CVABinauralOutdoorWaveFront::setDelay(const float delay) {
}
void CVABinauralOutdoorWaveFront::setMotion() {
}
\ No newline at end of file
......@@ -86,6 +86,10 @@ public:
void setParameters( const CVAStruct &oInArgs );
void setFilterCoefficients(const ITABase::CThirdOctaveGainMagnitudeSpectrum &oMags );
void setDelay( const float delay );
void setMotion();
virtual bool GetValidTrajectory() 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