From 26293db40f8ac62f3971e0e9dbbc0bf3439e61c0 Mon Sep 17 00:00:00 2001 From: Vasile Vilvoiu Date: Tue, 29 Dec 2020 19:33:03 +0200 Subject: Initial commit --- src/live.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/live.hpp (limited to 'src/live.hpp') diff --git a/src/live.hpp b/src/live.hpp new file mode 100644 index 0000000..b49db8c --- /dev/null +++ b/src/live.hpp @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020-2021 Vasile Vilvoiu + * + * specgram is free software; you can redistribute it and/or modify + * it under the terms of the MIT license. See LICENSE for details. + */ +#ifndef _LIVE_HPP_ +#define _LIVE_HPP_ + +#include "configuration.hpp" +#include "renderer.hpp" +#include "color-map.hpp" +#include + +class LiveOutput { +private: + /* configuration */ + const Configuration configuration_; + Renderer renderer_; + + /* live window */ + sf::RenderWindow window_; + + /* raw FFT history */ + std::vector fft_area_; + +public: + LiveOutput() = delete; + LiveOutput(const LiveOutput &c) = delete; + LiveOutput(LiveOutput &&) = delete; + LiveOutput & operator=(const LiveOutput&) = delete; + + LiveOutput(const Configuration& conf, const ColorMap& cmap, const ValueMap& vmap); + + void AddWindow(const std::vector& window, const RealWindow& win_values); + bool HandleEvents(); + void Render(); +}; + +#endif \ No newline at end of file -- cgit v1.2.3