VABinauralSoundSource.cpp 1.04 KB
Newer Older
1 2 3
#include "VABinauralSoundSource.h"


Lucas Moesch's avatar
WIP  
Lucas Moesch committed
4
VABinauralSoundSource::VABinauralSoundSource(const config_t& conf) :
5
	conf( conf )
Lucas Moesch's avatar
WIP  
Lucas Moesch committed
6
{
7 8
	vdlChL = new CITAVariableDelayLine(conf.sampleRate, conf.blockLength, 3. * conf.sampleRate, CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION);
	vdlChR = new CITAVariableDelayLine(conf.sampleRate, conf.blockLength, 3. * conf.sampleRate, CITAVariableDelayLine::CUBIC_SPLINE_INTERPOLATION);
Lucas Moesch's avatar
WIP  
Lucas Moesch committed
9
}
10 11 12 13 14 15 16 17 18


VABinauralSoundSource::~VABinauralSoundSource()
{
}

void
VABinauralSoundSource::PreRequest()
{
Lucas Moesch's avatar
WIP  
Lucas Moesch committed
19
	CVABasicMotionModel::Config sourceMotionConf;
20

21 22 23 24 25
	sourceMotionConf.bLogEstimatedOutputEnabled = conf.motionModelLogEstimated;
	sourceMotionConf.bLogInputEnabled = conf.motionModelLogInput;
	sourceMotionConf.dWindowDelay = conf.motionModelWindowDelay;
	sourceMotionConf.dWindowSize = conf.motionModelWindowSize;
	sourceMotionConf.iNumHistoryKeys = conf.motionModelNumHistoryKeys;
26

Lucas Moesch's avatar
WIP  
Lucas Moesch committed
27
	motionModel = new CVASharedMotionModel(new CVABasicMotionModel(sourceMotionConf), true);
28 29 30 31 32 33 34 35
	data = nullptr;
}

void
VABinauralSoundSource::PreRelease()
{
	delete motionModel;
}