audren: Fix AudioRenderer implementation (#773)

* Fix AudioRenderer implementation

According to RE:
- `GetAudioRendererWorkBufferSize` is updated and improved to support `REV7`
- `RequestUpdateAudioRenderer` is updated to `REV7` too

Should improve results on recent game and close #718 and #707

* Fix NodeStates.GetWorkBufferSize

* Use BitUtils instead of IntUtils

* Nits
This commit is contained in:
Ac_K 2019-09-20 01:49:05 +02:00 committed by Thomas Guillemard
parent a0720b5681
commit f17b772c56
15 changed files with 244 additions and 110 deletions

View file

@ -0,0 +1,30 @@
namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager
{
class BehaviorInfo
{
private const int _revision = AudioRendererConsts.Revision;
private int _userRevision = 0;
public BehaviorInfo()
{
/* TODO: this class got a size of 0xC0
0x00 - uint - Internal Revision
0x04 - uint - User Revision
0x08 - ... unknown ...
*/
}
public bool IsSplitterSupported() => AudioRendererCommon.CheckFeatureSupported(_userRevision, SupportTags.Splitter);
public bool IsSplitterBugFixed() => AudioRendererCommon.CheckFeatureSupported(_userRevision, SupportTags.SplitterBugFix);
public bool IsVariadicCommandBufferSizeSupported() => AudioRendererCommon.CheckFeatureSupported(_userRevision, SupportTags.VariadicCommandBufferSize);
public bool IsElapsedFrameCountSupported() => AudioRendererCommon.CheckFeatureSupported(_userRevision, SupportTags.ElapsedFrameCount);
public int GetPerformanceMetricsDataFormat() => AudioRendererCommon.CheckFeatureSupported(_userRevision, SupportTags.PerformanceMetricsDataFormatVersion2) ? 2 : 1;
public void SetUserLibRevision(int revision)
{
_userRevision = AudioRendererCommon.GetRevisionVersion(revision);
}
}
}