mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-07-01 00:29:04 +00:00
Memory changes 3 (ryubing/ryujinx!202)
See merge request ryubing/ryujinx!202
This commit is contained in:
@@ -188,6 +188,8 @@ namespace Ryujinx.Audio.Renderer.Server.Voice
|
||||
/// </summary>
|
||||
public Span<bool> BiquadFilterNeedInitialization => SpanHelpers.AsSpan<BiquadFilterNeedInitializationArrayStruct, bool>(ref _biquadFilterNeedInitialization);
|
||||
|
||||
private static List<ErrorInfo> _waveBufferUpdaterErrorInfosList;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the <see cref="VoiceInfo"/>.
|
||||
/// </summary>
|
||||
@@ -216,6 +218,8 @@ namespace Ryujinx.Audio.Renderer.Server.Voice
|
||||
DataSourceStateAddressInfo.Setup(0, 0);
|
||||
|
||||
InitializeWaveBuffers();
|
||||
|
||||
_waveBufferUpdaterErrorInfosList ??= [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -587,14 +591,14 @@ namespace Ryujinx.Audio.Renderer.Server.Voice
|
||||
|
||||
Span<WaveBuffer> waveBuffersSpan = WaveBuffers.AsSpan();
|
||||
Span<WaveBufferInternal> pWaveBuffersSpan = parameter.WaveBuffers.AsSpan();
|
||||
List<ErrorInfo> errorInfosList = [];
|
||||
_waveBufferUpdaterErrorInfosList.Clear();
|
||||
|
||||
for (int i = 0; i < Constants.VoiceWaveBufferCount; i++)
|
||||
{
|
||||
UpdateWaveBuffer(errorInfosList, ref waveBuffersSpan[i], ref pWaveBuffersSpan[i], parameter.SampleFormat, voiceState.IsWaveBufferValid[i], mapper, ref behaviourInfo);
|
||||
UpdateWaveBuffer(_waveBufferUpdaterErrorInfosList, ref waveBuffersSpan[i], ref pWaveBuffersSpan[i], parameter.SampleFormat, voiceState.IsWaveBufferValid[i], mapper, ref behaviourInfo);
|
||||
}
|
||||
|
||||
errorInfos = errorInfosList.ToArray();
|
||||
errorInfos = _waveBufferUpdaterErrorInfosList.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -628,14 +632,14 @@ namespace Ryujinx.Audio.Renderer.Server.Voice
|
||||
|
||||
Span<WaveBuffer> waveBuffersSpan = WaveBuffers.AsSpan();
|
||||
Span<WaveBufferInternal> pWaveBuffersSpan = parameter.WaveBuffers.AsSpan();
|
||||
List<ErrorInfo> errorInfosList = [];
|
||||
_waveBufferUpdaterErrorInfosList.Clear();
|
||||
|
||||
for (int i = 0; i < Constants.VoiceWaveBufferCount; i++)
|
||||
{
|
||||
UpdateWaveBuffer(errorInfosList, ref waveBuffersSpan[i], ref pWaveBuffersSpan[i], parameter.SampleFormat, voiceState.IsWaveBufferValid[i], mapper, ref behaviourInfo);
|
||||
UpdateWaveBuffer(_waveBufferUpdaterErrorInfosList, ref waveBuffersSpan[i], ref pWaveBuffersSpan[i], parameter.SampleFormat, voiceState.IsWaveBufferValid[i], mapper, ref behaviourInfo);
|
||||
}
|
||||
|
||||
errorInfos = errorInfosList.ToArray();
|
||||
errorInfos = _waveBufferUpdaterErrorInfosList.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user