summaryrefslogtreecommitdiff
path: root/Userland/Applications/SoundPlayer/CMakeLists.txt
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2021-09-29 21:55:42 -0700
committerAndreas Kling <kling@serenityos.org>2021-10-25 23:37:18 +0200
commit3126b78903a4cf8bdb91a0d4a2551558bf1cb77f (patch)
tree6a7e40356d875c5658b28df6c5037557099f6b23 /Userland/Applications/SoundPlayer/CMakeLists.txt
parent73924f94164c2bccf5097d68d1597abb5621f036 (diff)
downloadserenity-3126b78903a4cf8bdb91a0d4a2551558bf1cb77f.zip
SoundPlayer: Fix inconsistencies and code duplication
This is a first pass at refactoring SoundPlayer so that the View widget is decoupled from the player itself. In doing so, this fixed a couple of issues, including possibly inconsistent states (e.g. player could be paused and stopped at the same time). With the change, Player actually controls the show, and calls methods overriden by its subclasses to perform actions, such as update the Seek bar; the hard work of massaging the raw data is done by the Player class, so subclasses don't need to reimplement any of these things. This also removes some copies of playlist management code that happened to be copied+pasted inside callbacks of buttons -- it now lives inside a neatly packaged Playlist class, and the Player only asks for the next song to play. In addition, the menu bar has been slightly rearranged.
Diffstat (limited to 'Userland/Applications/SoundPlayer/CMakeLists.txt')
-rw-r--r--Userland/Applications/SoundPlayer/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Applications/SoundPlayer/CMakeLists.txt b/Userland/Applications/SoundPlayer/CMakeLists.txt
index 9fe6266b34..578078938e 100644
--- a/Userland/Applications/SoundPlayer/CMakeLists.txt
+++ b/Userland/Applications/SoundPlayer/CMakeLists.txt
@@ -7,6 +7,8 @@ serenity_component(
set(SOURCES
main.cpp
+ Player.cpp
+ Playlist.cpp
PlaybackManager.cpp
SampleWidget.cpp
SoundPlayerWidgetAdvancedView.cpp