1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +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:
Nícolas F. R. A. Prado 2022-02-27 20:18:28 -05:00 committed by Brian Gianforcaro
parent 064cfd6cb7
commit 2e1c017bce
3 changed files with 4 additions and 0 deletions

View file

@ -206,6 +206,7 @@ void SoundPlayerWidgetAdvancedView::time_elapsed(int seconds)
void SoundPlayerWidgetAdvancedView::file_name_changed(StringView name)
{
m_visualization->start_new_file(name);
m_window.set_title(String::formatted("{} - Sound Player", name));
}