diff options
| author | Vasile Vilvoiu <vasi.vilvoiu@gmail.com> | 2020-12-29 19:33:03 +0200 |
|---|---|---|
| committer | Vasile Vilvoiu <vasi.vilvoiu@gmail.com> | 2020-12-29 19:33:03 +0200 |
| commit | 26293db40f8ac62f3971e0e9dbbc0bf3439e61c0 (patch) | |
| tree | 218c93aba851c3c3123e9e72d25c974aa65cfd52 /src/live.hpp | |
Initial commit
Diffstat (limited to 'src/live.hpp')
| -rw-r--r-- | src/live.hpp | 40 |
1 files changed, 40 insertions, 0 deletions
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 <vasi.vilvoiu@gmail.com> + * + * 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 <SFML/Graphics.hpp> + +class LiveOutput { +private: + /* configuration */ + const Configuration configuration_; + Renderer renderer_; + + /* live window */ + sf::RenderWindow window_; + + /* raw FFT history */ + std::vector<uint8_t> 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<uint8_t>& window, const RealWindow& win_values); + bool HandleEvents(); + void Render(); +}; + +#endif
\ No newline at end of file |
