forked from spotify/echoprint-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWhitening.h
More file actions
41 lines (33 loc) · 782 Bytes
/
Whitening.h
File metadata and controls
41 lines (33 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// echoprint-codegen
// Copyright 2011 The Echo Nest Corporation. All rights reserved.
//
#ifndef WHITENING_H
#define WHITENING_H
#include "Common.h"
#include "Params.h"
#include "MatrixUtility.h"
class AudioStreamInput;
class Whitening {
public:
inline Whitening() {};
Whitening(AudioStreamInput* pAudio);
Whitening(const float* pSamples, uint numSamples);
virtual ~Whitening();
void Compute();
void ComputeBlock(int start, int blockSize);
public:
float* getWhitenedSamples() const {return _whitened;}
inline uint getNumSamples() const {return _NumSamples;}
protected:
const float* _pSamples;
float* _whitened;
uint _NumSamples;
float* _R;
float *_Xo;
float *_ai;
int _p;
private:
void Init();
};
#endif