summaryrefslogtreecommitdiffhomepage
path: root/tuner.cpp
blob: d1833a3151f9d6299f467f72ba7b1799b8d53838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "tuner.h"

#include "autocorrelation.h"
#include "fft.h"

struct RIT::Tuner::Impl {
public:
	Impl(int size, int f_sample): mAC(size), m_f_sample(f_sample) {}
	RIT::AutoCorrelation mAC;
	int m_f_sample;
};

RIT::Tuner::Tuner(int size, int f_sample): mImpl(std::make_unique<RIT::Tuner::Impl>(size, f_sample))
{
}

RIT::Tuner::~Tuner(){}

RIT::Pitch RIT::Tuner::operator() (const std::vector<std::complex<double>> &v)
{
	std::vector<std::complex<double>> autoCorrelation = mImpl->mAC(v);

	return Pitch();
}