From ce5f162b25425e41d69aeacae512dfc3da6d9010 Mon Sep 17 00:00:00 2001 From: Stepland <10530295-Buggyroom@users.noreply.gitlab.com> Date: Tue, 4 Oct 2022 01:07:38 +0200 Subject: [PATCH] Actually the lag correction is supposed to always be multiplied by the pitch no matter what --- src/custom_sfml_audio/synced_sound_streams.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/custom_sfml_audio/synced_sound_streams.cpp b/src/custom_sfml_audio/synced_sound_streams.cpp index 7dbcb69..cfe46aa 100644 --- a/src/custom_sfml_audio/synced_sound_streams.cpp +++ b/src/custom_sfml_audio/synced_sound_streams.cpp @@ -266,12 +266,7 @@ sf::Time SyncedSoundStreams::getPrecisePlayingOffset() const { const auto correction = ( s.stream->alSecOffsetLatencySoft()[1] - s.stream->lag ); - if (s.reconstruct_on_pitch_change) { - return base - (correction * pitch); - } else { - return base - correction; - } - + return base - (correction * pitch); } void SyncedSoundStreams::setPitch(float new_pitch) {