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
commit 2e1c017bce
Notes: sideshowbarker 2024-07-17 18:00:32 +09:00
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));
}