From 567597e3531fff30f7d562c64104895d8be37422 Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Thu, 22 Jan 2026 23:47:00 +0200 Subject: [PATCH] Remove Config.ExtrapolateTime even from Debug build Just always do it, there is no reason not to. And maybe try dspTime to replace the whole extrapolation technique. --- MuzikaGromche/Plugin.cs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/MuzikaGromche/Plugin.cs b/MuzikaGromche/Plugin.cs index 174bccf..66fdbf8 100644 --- a/MuzikaGromche/Plugin.cs +++ b/MuzikaGromche/Plugin.cs @@ -1895,7 +1895,7 @@ namespace MuzikaGromche LastKnownNonExtrapolatedTime = ExtrapolatedTime = audioSource.time; } // Frames are rendering faster than AudioSource updates its playback time state - else if (IsPlaying && HasStarted && Config.ExtrapolateTime) + else if (IsPlaying && HasStarted) { #if DEBUG Debug.Assert(LastKnownNonExtrapolatedTime == audioSource.time); // implied @@ -2541,7 +2541,6 @@ namespace MuzikaGromche public static ConfigEntry OverrideSpawnRates { get; private set; } = null!; - public static bool ExtrapolateTime { get; private set; } = true; public static bool ShouldSkipWindingPhase { get; private set; } = false; public static bool VanillaCompatMode { get; private set; } = false; @@ -2628,7 +2627,6 @@ namespace MuzikaGromche #if DEBUG SetupEntriesForGameOverText(configFile); SetupEntriesForScreenFilters(configFile); - SetupEntriesForExtrapolation(configFile); SetupEntriesToSkipWinding(configFile); SetupEntriesForPaletteOverride(configFile); SetupEntriesForTimingsOverride(configFile); @@ -2687,20 +2685,6 @@ namespace MuzikaGromche } #if DEBUG - private void SetupEntriesForExtrapolation(ConfigFile configFile) - { - var entry = configFile.Bind("General", "Extrapolate Audio Playback Time", true, - new ConfigDescription("AudioSource only updates its playback position about 20 times per second.\n\nUse extrapolation technique to predict playback time between updates for smoother color animations.")); - LethalConfigManager.AddConfigItem(new BoolCheckBoxConfigItem(entry, requiresRestart: false)); - entry.SettingChanged += (sender, args) => apply(); - apply(); - - void apply() - { - ExtrapolateTime = entry.Value; - } - } - private void SetupEntriesToSkipWinding(ConfigFile configFile) { var entry = configFile.Bind("General", "Skip Winding Phase", false,