mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-16 22:37:06 +00:00
audio effects fix and audio object pooling
Revert and reimplement Float BiquadFilterEffect support, fixes infinite load issues in a few games like Splatoon 3. Fix incorrect string check with the new thread naming system. Implement object pooling for all Audio Commands and a few other audio related objects and use a growing error list for updating wave buffers instead of always allocating space for 8 errors.
This commit is contained in:
parent
f34ab9f043
commit
e1b6cb71f8
43 changed files with 763 additions and 602 deletions
|
|
@ -9,25 +9,29 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
|
|||
{
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public int NodeId { get; }
|
||||
public int NodeId { get; private set; }
|
||||
|
||||
public CommandType CommandType => CommandType.CircularBufferSink;
|
||||
|
||||
public uint EstimatedProcessingTime { get; set; }
|
||||
|
||||
public ushort[] Input { get; }
|
||||
public uint InputCount { get; }
|
||||
public uint InputCount { get; private set; }
|
||||
|
||||
public ulong CircularBuffer { get; }
|
||||
public ulong CircularBufferSize { get; }
|
||||
public ulong CurrentOffset { get; }
|
||||
public ulong CircularBuffer { get; private set; }
|
||||
public ulong CircularBufferSize { get; private set; }
|
||||
public ulong CurrentOffset { get; private set; }
|
||||
|
||||
public CircularBufferSinkCommand(uint bufferOffset, ref CircularBufferParameter parameter, ref AddressInfo circularBufferAddressInfo, uint currentOffset, int nodeId)
|
||||
public CircularBufferSinkCommand()
|
||||
{
|
||||
Input = new ushort[Constants.ChannelCountMax];
|
||||
}
|
||||
|
||||
public CircularBufferSinkCommand Initialize(uint bufferOffset, ref CircularBufferParameter parameter, ref AddressInfo circularBufferAddressInfo, uint currentOffset, int nodeId)
|
||||
{
|
||||
Enabled = true;
|
||||
NodeId = nodeId;
|
||||
|
||||
Input = new ushort[Constants.ChannelCountMax];
|
||||
InputCount = parameter.InputCount;
|
||||
|
||||
Span<byte> inputSpan = parameter.Input.AsSpan();
|
||||
|
|
@ -42,6 +46,8 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
|
|||
CurrentOffset = currentOffset;
|
||||
|
||||
Debug.Assert(CircularBuffer != 0);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Process(CommandList context)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue