mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-06 12:29:15 +00:00
@@ -129,7 +129,6 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
|
||||
delayFeedbackCrossGain, 0.0f, delayFeedbackBaseGain, delayFeedbackCrossGain,
|
||||
0.0f, delayFeedbackCrossGain, delayFeedbackCrossGain, delayFeedbackBaseGain);
|
||||
|
||||
|
||||
for (int i = 0; i < sampleCount; i++)
|
||||
{
|
||||
Vector4 channelInput = new()
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.State
|
||||
|
||||
DelayFeedbackBaseGain = (1.0f - channelSpread) * FeedbackGain;
|
||||
|
||||
if (parameter.ChannelCount == 4 || parameter.ChannelCount == 6)
|
||||
if (parameter.ChannelCount is 4 or 6)
|
||||
{
|
||||
DelayFeedbackCrossGain = channelSpread * 0.5f * FeedbackGain;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace Ryujinx.Audio.Renderer.Dsp
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
return (MathF.Sin(MathF.PI * x) / (MathF.PI * x));
|
||||
}
|
||||
|
||||
@@ -141,6 +142,7 @@ namespace Ryujinx.Audio.Renderer.Dsp
|
||||
|
||||
state.Phase = (state.Phase + 1) % 6;
|
||||
}
|
||||
|
||||
break;
|
||||
case 3.0f:
|
||||
for (int i = 0; i < outputSampleCount; i++)
|
||||
@@ -161,6 +163,7 @@ namespace Ryujinx.Audio.Renderer.Dsp
|
||||
|
||||
state.Phase = (state.Phase + 1) % 3;
|
||||
}
|
||||
|
||||
break;
|
||||
case 1.5f:
|
||||
// Upsample by 3 then decimate by 2.
|
||||
@@ -183,6 +186,7 @@ namespace Ryujinx.Audio.Renderer.Dsp
|
||||
|
||||
state.Phase = (state.Phase + 1) % 3;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(state), state.Scale, null);
|
||||
|
||||
Reference in New Issue
Block a user