diff --git a/Userland/Applications/SoundPlayer/Player.cpp b/Userland/Applications/SoundPlayer/Player.cpp index 0b3adf1384..2687d58c0d 100644 --- a/Userland/Applications/SoundPlayer/Player.cpp +++ b/Userland/Applications/SoundPlayer/Player.cpp @@ -64,7 +64,8 @@ void Player::play_file_path(DeprecatedString const& path) m_loaded_filename = path; - total_samples_changed(loader->total_samples()); + // TODO: The combination of sample count, sample rate, and sample data should be properly abstracted for the source and the playback device. + total_samples_changed(loader->total_samples() * (static_cast(loader->sample_rate()) / m_playback_manager.device_sample_rate())); m_playback_manager.set_loader(move(loader)); file_name_changed(path);