diff --git a/Util/Audio/Mixer/VoiceMixer.cs b/Util/Audio/Mixer/VoiceMixer.cs index 9be63e6..b522d4b 100644 --- a/Util/Audio/Mixer/VoiceMixer.cs +++ b/Util/Audio/Mixer/VoiceMixer.cs @@ -75,8 +75,11 @@ internal sealed class VoiceMixer : IDisposable /// Voices currently mixed (started or waiting to start). Render thread only. public int ActiveVoiceCount => _voices.Count; - /// Output sample nearest to . - public static long ToSample(double seconds, int rate) => (long)Math.Round(seconds * rate, MidpointRounding.AwayFromZero); + /// + /// Output sample containing (seconds × rate rounded down), the sample at which + /// AudioSource.PlayScheduled starts a sound scheduled between two output samples. + /// + public static long ToSample(double seconds, int rate) => (long)Math.Floor(seconds * rate); // ── Main thread ──