Archived
1
0
Fork 0
forked from Mirror/Ryujinx
This repository has been archived on 2024-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
jinx/Ryujinx.Audio/Renderer/Server/CommandProcessingTimeEstimatorVersion4.cs
Nicholas Rodine 951700fdd8
Removed unused usings. (#3593)
* Removed unused usings.

* Added back using, now that it's used.

* Removed extra whitespace.
2022-08-18 18:04:54 +02:00

47 lines
No EOL
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(GroupedBiquadFilterCommand 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;
}
}
}