1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

SoundPlayer: Don't offset the seek bar with the last seek value

The audio loader plugins already do this internally, if we do this a
second time the seek bar will just end up getting rendered at the wrong
place.
This commit is contained in:
Tim Schumacher 2023-01-17 21:11:47 +01:00 committed by Jelle Raaijmakers
parent daf181caa8
commit dfc57c0dd9
3 changed files with 0 additions and 5 deletions

View file

@ -18,7 +18,6 @@ Player::Player(Audio::ConnectionToServer& audio_client_connection)
auto sample_rate = m_playback_manager.loader()->sample_rate();
float source_to_dest_ratio = static_cast<float>(sample_rate) / m_playback_manager.device_sample_rate();
samples_played *= source_to_dest_ratio;
samples_played += m_playback_manager.last_seek();
auto played_seconds = samples_played / sample_rate;
time_elapsed(played_seconds);