From e7866fda55c52f17c7d9e8f02fd67e48695614a7 Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Tue, 14 Oct 2025 00:32:42 +0300 Subject: [PATCH] Fix division erroneously rounding to integers This fixes LoopOffset which is a non-integer factor or Beats. --- MuzikaGromche/Plugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MuzikaGromche/Plugin.cs b/MuzikaGromche/Plugin.cs index 011bee0..fb0dde4 100644 --- a/MuzikaGromche/Plugin.cs +++ b/MuzikaGromche/Plugin.cs @@ -978,7 +978,7 @@ namespace MuzikaGromche // Number of beats between WindUpTimer and where looped segment starts (not the loop audio). public int LoopOffset { get; } - public float LoopOffsetInSeconds => LoopOffset / Beats * LoadedLoop.length; + public float LoopOffsetInSeconds => (float)LoopOffset / (float)Beats * LoadedLoop.length; // MPEG is basically mp3, and it can produce gaps at the start. // WAV is OK, but takes a lot of space. Try OGGVORBIS instead.