From eac187fcbafcc518185d1074395c5fbe6a7e5aec Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Sun, 17 Feb 2019 22:10:33 +0100 Subject: Added portaudio support --- tunerdemo.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'tunerdemo.cpp') diff --git a/tunerdemo.cpp b/tunerdemo.cpp index e70afb2..9a1f70b 100644 --- a/tunerdemo.cpp +++ b/tunerdemo.cpp @@ -1,23 +1,21 @@ #include "tuner.h" +#include "audioio.h" + #include #include #include using namespace std::chrono_literals; -const int sampleFrequency = 44100; -const int fftSize = 4096; +int main(int argc, char* argv[]) { + RIT::AudioIO audioIO; -std::vector> sample() -{ - return std::vector>(fftSize, 0.0); -} + RIT::Tuner tuner(audioIO.size(), audioIO.sampleFrequency()); -int main(int argc, char* argv[]) { - RIT::Tuner tuner(fftSize, sampleFrequency); + std::cout << "Tuner range: " << tuner.fMin() << " ... " << tuner.fMax() << " Hz" << std::endl; - std::vector> dataIn = sample(); + std::vector> dataIn = audioIO.sample(); while (true) { auto start = std::chrono::high_resolution_clock::now(); -- cgit v1.2.3