From fef594c82518a8fe4c96794852c1fc849c0ed3b3 Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Sun, 17 Feb 2019 12:55:13 +0100 Subject: Added tunerdemo --- fft.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'fft.cpp') diff --git a/fft.cpp b/fft.cpp index 7d76e23..a8009ad 100644 --- a/fft.cpp +++ b/fft.cpp @@ -42,7 +42,6 @@ RIT::FFT::FFT(int size, bool halfOnly): mSize(size), order(size), expLUT(size/2) } } - std::vector> RIT::FFT::operator()(const std::vector> &v) const { if (v.size() != mSize) throw std::length_error("Bad input size"); @@ -159,28 +158,3 @@ std::vector> RIT::IFFT::operator()(const std::vector(size)), mIfft(mFft) {} - std::shared_ptr mFft; - RIT::IFFT mIfft; -}; - -RIT::AutoCorrelation::AutoCorrelation(int size): mImpl(std::make_unique(size)) -{ -} - -RIT::AutoCorrelation::~AutoCorrelation() -{ -} - -std::vector> RIT::AutoCorrelation::operator()(const std::vector> &v) const -{ - auto result = (*mImpl->mFft)(v); - - std::transform(std::begin(result), std::end(result), std::begin(result), - [=](const auto& x){return x * std::conj(x);}); - - return mImpl->mIfft(result); -} - -- cgit v1.2.3