#pragma once #include #include #include #include #include namespace ImGui { class WaterFall { public: WaterFall(); void draw(float* vfo); void pushFFT(std::vector data, int n); float centerFrequency; float bandWidth; float range; private: void drawWaterfall(ImGuiWindow* window, int width, int height, ImVec2 pos); void drawFFT(ImGuiWindow* window, int width, int height, ImVec2 pos, float* vfo); std::vector> fftBuffer; bool newSamples; std::mutex buf_mtx; GLuint textureId; uint8_t* pixelBuffer; float* fftDrawBuffer; }; };