VABinauralClusteringState.h 1.41 KB
Newer Older
1 2 3 4 5 6 7 8 9
#ifndef IW_VACORE_BINAURALCLUSTERINGSTATE
#define IW_VACORE_BINAURALCLUSTERINGSTATE

#include <queue>

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

10 11 12
// ITA includes
#include <ITAUPConvolution.h>

13 14 15
// Utils
#include "VABinauralCluster.h"
#include "../BinauralSoundSource/VABinauralSoundSource.h"
16
#include "../BinauralListener/VABinauralListener.h"
17 18 19 20 21 22 23 24 25 26

class VABinauralClusteringState
{
public:
	int numClusters;

	std::queue< int > freeClusterIDs;
	std::map< int, int> sourceClusterReference;
	std::map< int, VABinauralCluster* > clusters;

27 28
	VABinauralListener* listener;

29
	VABinauralClusteringState(int numClusters, VABinauralListener* listener, IVAObjectPool* clusterPool, std::map<int, ITAUPConvolution*>* FIRConvolverCHL, std::map<int, ITAUPConvolution*>* FIRConvolverCHR);
30 31 32 33 34 35 36 37

	VABinauralClusteringState(const VABinauralClusteringState& state);

	~VABinauralClusteringState();

	void
	addSource(int sourceID, VABinauralSoundSource* source, double threshold, int numBlockedClusters);

Lucas Moesch's avatar
wip  
Lucas Moesch committed
38 39 40
	void
	removeSource(int sourceID);

41
	std::pair< int, VABinauralCluster*>
Lucas Moesch's avatar
WIP  
Lucas Moesch committed
42
	createCluster(int sourceID, VABinauralSoundSource* source);
43

Lucas Moesch's avatar
Lucas Moesch committed
44 45 46
	std::pair< int, VABinauralCluster*>
	createCluster(int clusterID, VABinauralCluster* cluster);

47 48 49
	double getMaxError();

private:
50 51
	std::map<int, ITAUPConvolution*>* _FIRConvolverChL;
	std::map<int, ITAUPConvolution*>* _FIRConvolverChR;
52 53 54 55
	IVAObjectPool* _clusterPool;
};

#endif // IW_VACORE_BINAURALCLUSTERINGSTATE