diff --git a/src/BizHawk.Client.Common/Sound/Utilities/SoundOutputProvider.cs b/src/BizHawk.Client.Common/Sound/Utilities/SoundOutputProvider.cs index 7fc8ba96d8..c753af739b 100644 --- a/src/BizHawk.Client.Common/Sound/Utilities/SoundOutputProvider.cs +++ b/src/BizHawk.Client.Common/Sound/Utilities/SoundOutputProvider.cs @@ -263,7 +263,11 @@ namespace BizHawk.Client.Common // would drift by ~22 milliseconds per minute. _resampleLengthRoundingError = newCountExact - count; - AddSamplesToBuffer(samples, count); + if (count > 0) + { + // in rare cases (with subframe core tiny sample spam) count can be negative, somehow + AddSamplesToBuffer(samples, count); + } } private static double CalculatePowerMean(IEnumerable values, double power)