diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-01-17 21:27:13 +0100 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-01-19 11:42:32 +0100 |
commit | 9bf97028422bfd68c3624f0b4fff9b5ea2090e09 (patch) | |
tree | db57a62c314c866ad8a6bfc99dcc9eb1e11851ad /Userland/Applications/SoundPlayer/Player.cpp | |
parent | dfc57c0dd9b95bcc5072700cc06406e83a05eb26 (diff) | |
download | serenity-9bf97028422bfd68c3624f0b4fff9b5ea2090e09.zip |
SoundPlayer: Translate device samples to source samples before seeking
Diffstat (limited to 'Userland/Applications/SoundPlayer/Player.cpp')
-rw-r--r-- | Userland/Applications/SoundPlayer/Player.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Applications/SoundPlayer/Player.cpp b/Userland/Applications/SoundPlayer/Player.cpp index 31f4aadbf3..87c3684e48 100644 --- a/Userland/Applications/SoundPlayer/Player.cpp +++ b/Userland/Applications/SoundPlayer/Player.cpp @@ -155,6 +155,7 @@ void Player::toggle_mute() void Player::seek(int sample) { + sample *= (m_playback_manager.device_sample_rate() / static_cast<float>(m_playback_manager.loader()->sample_rate())); m_playback_manager.seek(sample); } |