aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ryujinx.Audio.Renderer/Dsp/Effect/DelayLine.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Ryujinx.Audio.Renderer/Dsp/Effect/DelayLine.cs b/Ryujinx.Audio.Renderer/Dsp/Effect/DelayLine.cs
index b443cd15..3766390a 100644
--- a/Ryujinx.Audio.Renderer/Dsp/Effect/DelayLine.cs
+++ b/Ryujinx.Audio.Renderer/Dsp/Effect/DelayLine.cs
@@ -42,7 +42,15 @@ namespace Ryujinx.Audio.Renderer.Dsp.Effect
{
CurrentSampleCount = Math.Min(SampleCountMax, targetSampleCount);
_currentSampleIndex = 0;
- _lastSampleIndex = CurrentSampleCount - 1;
+
+ if (CurrentSampleCount == 0)
+ {
+ _lastSampleIndex = 0;
+ }
+ else
+ {
+ _lastSampleIndex = CurrentSampleCount - 1;
+ }
}
public void SetDelay(float delayTime)