From 9bf97028422bfd68c3624f0b4fff9b5ea2090e09 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Tue, 17 Jan 2023 21:27:13 +0100 Subject: [PATCH] SoundPlayer: Translate device samples to source samples before seeking --- Userland/Applications/SoundPlayer/Player.cpp | 1 + 1 file changed, 1 insertion(+) 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(m_playback_manager.loader()->sample_rate())); m_playback_manager.seek(sample); }