1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 06:15:07 +00:00
serenity/Userland/Applications/SoundPlayer/SampleWidget.h
Arne Elster 9edaa033e5 SoundPlayer: Auto refresh visualization widgets
Visualization widgets should only have to tell how many samples they
need per frame and have a render method which receives all data relevant
to draw the next frame.
2022-03-14 22:45:05 +01:00

21 lines
500 B
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "VisualizationWidget.h"
#include <LibGUI/Frame.h>
class SampleWidget final : public VisualizationWidget {
C_OBJECT(SampleWidget)
public:
virtual ~SampleWidget() override = default;
private:
SampleWidget();
virtual void render(GUI::PaintEvent&, FixedArray<double> const& samples) override;
};