VABinauralListener.h 1.12 KB
Newer Older
1 2 3 4 5 6 7
#ifndef IW_VACORE_BINAURALLISTENER
#define IW_VACORE_BINAURALLISTENER

// VA includes
#include <VA.h>
#include <VAPoolObject.h>

8 9 10 11 12 13 14 15
#include "../../../../../VACoreImpl.h"
#include "../../../../../Motion/VAMotionModelBase.h"
#include "../../../../../Motion/VASharedMotionModel.h"
#include "../../../../../Scene/VAScene.h"

// ITA includes
#include <ITASampleFrame.h>

16 17 18
// Utils
#include "../BinauralTimeOfArrivalEstimator/VABinauralTOAEstimator.h"

19 20 21
class VABinauralListener : public CVAPoolObject
{
public:
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
	struct config_t {
		bool motionModelLogInput;
		bool motionModelLogEstimated;

		double motionModelWindowSize;
		double motionModelWindowDelay;

		int motionModelNumHistoryKeys;
	};

	CVAListenerDesc* data;
	CVASharedMotionModel* motionModel;

	VAVec3 predPos;
	VAVec3 prefView;
	VAVec3 predUp;

39 40 41
	ITASampleFrame* output;

	VABinauralTOAEstimator* toaEstimator;
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

	VABinauralListener(const CVACoreImpl* core, const config_t& conf);

	virtual 
	~VABinauralListener();

	void
	PreRequest();

	void
	PreRelease();

private:
	const config_t _conf;
	const CVACoreImpl* _core;

	double _dCreationTimeStamp;
59 60
};

61
#endif // IW_VACORE_BINAURALLISTENER