Should use Volume1 if no ramp
This commit is contained in:
parent
08a07fc190
commit
7508e75827
2 changed files with 4 additions and 6 deletions
|
@ -94,10 +94,9 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
|
||||||
BiquadFilterState.Span[0] = PreviousBiquadFilterState.Span[0];
|
BiquadFilterState.Span[0] = PreviousBiquadFilterState.Span[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
float volume = Volume0;
|
|
||||||
|
|
||||||
if (HasVolumeRamp)
|
if (HasVolumeRamp)
|
||||||
{
|
{
|
||||||
|
float volume = Volume0;
|
||||||
float ramp = (Volume1 - Volume0) / (int)context.SampleCount;
|
float ramp = (Volume1 - Volume0) / (int)context.SampleCount;
|
||||||
|
|
||||||
State.Span[0].LastSamples[LastSampleIndex] = BiquadFilterHelper.ProcessBiquadFilterAndMixRamp(
|
State.Span[0].LastSamples[LastSampleIndex] = BiquadFilterHelper.ProcessBiquadFilterAndMixRamp(
|
||||||
|
@ -117,7 +116,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
|
||||||
outputBuffer,
|
outputBuffer,
|
||||||
inputBuffer,
|
inputBuffer,
|
||||||
context.SampleCount,
|
context.SampleCount,
|
||||||
volume);
|
Volume1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,10 +112,9 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
|
||||||
UpdateState(BiquadFilterState0, PreviousBiquadFilterState0, NeedInitialization0);
|
UpdateState(BiquadFilterState0, PreviousBiquadFilterState0, NeedInitialization0);
|
||||||
UpdateState(BiquadFilterState1, PreviousBiquadFilterState1, NeedInitialization1);
|
UpdateState(BiquadFilterState1, PreviousBiquadFilterState1, NeedInitialization1);
|
||||||
|
|
||||||
float volume = Volume0;
|
|
||||||
|
|
||||||
if (HasVolumeRamp)
|
if (HasVolumeRamp)
|
||||||
{
|
{
|
||||||
|
float volume = Volume0;
|
||||||
float ramp = (Volume1 - Volume0) / (int)context.SampleCount;
|
float ramp = (Volume1 - Volume0) / (int)context.SampleCount;
|
||||||
|
|
||||||
State.Span[0].LastSamples[LastSampleIndex] = BiquadFilterHelper.ProcessDoubleBiquadFilterAndMixRamp(
|
State.Span[0].LastSamples[LastSampleIndex] = BiquadFilterHelper.ProcessDoubleBiquadFilterAndMixRamp(
|
||||||
|
@ -139,7 +138,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
|
||||||
outputBuffer,
|
outputBuffer,
|
||||||
inputBuffer,
|
inputBuffer,
|
||||||
context.SampleCount,
|
context.SampleCount,
|
||||||
volume);
|
Volume1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue