mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 11:06:24 +02:00

* Update audio renderer to REV12: Add support for splitter biquad filter * Formatting * Official names * Update BiquadFilterState size + other fixes * Update tests * Update comment for version 2 * Size test for SplitterDestinationVersion2 * Should use Volume1 if no ramp
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using Ryujinx.Audio.Renderer.Dsp.Command;
|
|
using System.Diagnostics;
|
|
|
|
namespace Ryujinx.Audio.Renderer.Server
|
|
{
|
|
/// <summary>
|
|
/// <see cref="ICommandProcessingTimeEstimator"/> version 4. (added with REV10)
|
|
/// </summary>
|
|
public class CommandProcessingTimeEstimatorVersion4 : CommandProcessingTimeEstimatorVersion3
|
|
{
|
|
public CommandProcessingTimeEstimatorVersion4(uint sampleCount, uint bufferCount) : base(sampleCount, bufferCount) { }
|
|
|
|
public override uint Estimate(MultiTapBiquadFilterCommand command)
|
|
{
|
|
Debug.Assert(SampleCount == 160 || SampleCount == 240);
|
|
|
|
if (SampleCount == 160)
|
|
{
|
|
return (uint)7424.5f;
|
|
}
|
|
|
|
return (uint)9730.4f;
|
|
}
|
|
|
|
public override uint Estimate(CaptureBufferCommand command)
|
|
{
|
|
Debug.Assert(SampleCount == 160 || SampleCount == 240);
|
|
|
|
if (SampleCount == 160)
|
|
{
|
|
if (command.Enabled)
|
|
{
|
|
return (uint)435.2f;
|
|
}
|
|
|
|
return (uint)4261.0f;
|
|
}
|
|
|
|
if (command.Enabled)
|
|
{
|
|
return (uint)5858.26f;
|
|
}
|
|
|
|
return (uint)435.2f;
|
|
}
|
|
}
|
|
}
|