mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:27:45 +00:00
SoundPlayer: Add start_new_file() to VisualizationWidget's API
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.
This commit is contained in:
parent
064cfd6cb7
commit
2e1c017bce
3 changed files with 4 additions and 0 deletions
|
@ -32,6 +32,8 @@ public:
|
|||
auto new_visualization = T::construct();
|
||||
m_player_view->insert_child_before(new_visualization, *static_cast<Core::Object*>(m_playback_progress_slider.ptr()));
|
||||
m_visualization = new_visualization;
|
||||
if (!loaded_filename().is_empty())
|
||||
m_visualization->start_new_file(loaded_filename());
|
||||
}
|
||||
|
||||
virtual void play_state_changed(PlayState) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue