ryujinx-mirror/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/BehaviorInfo.cs
Ac_K f17b772c56 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
2019-09-20 01:49:05 +02:00

30 lines
No EOL
1.4 KiB
C#

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);
}
}
}