2021-03-21 12:49:14 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Cesar Torres <shortanemoia@protonmail.com>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-03-21 12:49:14 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibAudio/Buffer.h>
|
2021-09-29 21:55:42 -07:00
|
|
|
#include <LibGUI/Frame.h>
|
|
|
|
|
|
|
|
class VisualizationWidget : public GUI::Frame {
|
|
|
|
C_OBJECT(VisualizationWidget)
|
2021-03-21 12:49:14 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
virtual void set_buffer(RefPtr<Audio::Buffer> buffer) = 0;
|
2021-03-26 01:28:56 +01:00
|
|
|
virtual void set_samplerate(int) { }
|
2021-04-15 10:43:29 -07:00
|
|
|
|
|
|
|
protected:
|
2021-10-31 23:38:04 +01:00
|
|
|
VisualizationWidget() = default;
|
2021-09-29 21:55:42 -07:00
|
|
|
virtual ~VisualizationWidget() = default;
|
2021-03-21 12:49:14 +01:00
|
|
|
};
|