From 45e928bfb294e43cd54bb75567c8ce3bf0645662 Mon Sep 17 00:00:00 2001 From: Cesar Torres Date: Sun, 21 Mar 2021 12:58:00 +0100 Subject: [PATCH] SoundPlayer: Adapt the existing SampleWidget visualization to the new abstraction --- Userland/Applications/SoundPlayer/SampleWidget.cpp | 2 +- Userland/Applications/SoundPlayer/SampleWidget.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Userland/Applications/SoundPlayer/SampleWidget.cpp b/Userland/Applications/SoundPlayer/SampleWidget.cpp index b3884a175a..041f66e0e3 100644 --- a/Userland/Applications/SoundPlayer/SampleWidget.cpp +++ b/Userland/Applications/SoundPlayer/SampleWidget.cpp @@ -73,7 +73,7 @@ void SampleWidget::paint_event(GUI::PaintEvent& event) } } -void SampleWidget::set_buffer(Audio::Buffer* buffer) +void SampleWidget::set_buffer(RefPtr buffer) { if (m_buffer == buffer) return; diff --git a/Userland/Applications/SoundPlayer/SampleWidget.h b/Userland/Applications/SoundPlayer/SampleWidget.h index 7da9c20b38..a89f5ff700 100644 --- a/Userland/Applications/SoundPlayer/SampleWidget.h +++ b/Userland/Applications/SoundPlayer/SampleWidget.h @@ -26,18 +26,20 @@ #pragma once +#include "VisualizationBase.h" #include namespace Audio { class Buffer; } -class SampleWidget final : public GUI::Frame { +class SampleWidget final : public GUI::Frame + , public Visualization { C_OBJECT(SampleWidget) public: virtual ~SampleWidget() override; - void set_buffer(Audio::Buffer*); + void set_buffer(RefPtr) override; private: SampleWidget();