mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 08:32:54 +00:00
This adds a new start_new_file() function to VisualizationWidget which is called when the player starts a new file, passing the filename of the file. This allows VisualizationWidget subclasses to do any setup needed when a new file is started.
23 lines
529 B
C++
23 lines
529 B
C++
/*
|
|
* Copyright (c) 2021, Cesar Torres <shortanemoia@protonmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibAudio/Buffer.h>
|
|
#include <LibGUI/Frame.h>
|
|
|
|
class VisualizationWidget : public GUI::Frame {
|
|
C_OBJECT(VisualizationWidget)
|
|
|
|
public:
|
|
virtual void set_buffer(RefPtr<Audio::Buffer> buffer) = 0;
|
|
virtual void set_samplerate(int) { }
|
|
virtual void start_new_file(StringView) { }
|
|
|
|
protected:
|
|
VisualizationWidget() = default;
|
|
virtual ~VisualizationWidget() = default;
|
|
};
|