mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-04-21 06:02:54 +00:00
SDK20 and REV15 support (ryubing/ryujinx!50)
See merge request ryubing/ryujinx!50
This commit is contained in:
@@ -9,7 +9,8 @@ namespace Ryujinx.Tests.Audio.Renderer
|
||||
[Test]
|
||||
public void EnsureTypeSize()
|
||||
{
|
||||
Assert.AreEqual(0xC, Unsafe.SizeOf<BiquadFilterParameter>());
|
||||
Assert.AreEqual(0xC, Unsafe.SizeOf<BiquadFilterParameter1>());
|
||||
Assert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterParameter2>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ryujinx.Tests.Audio.Renderer.Common
|
||||
{
|
||||
class VoiceUpdateStateTests
|
||||
class VoiceStateTests
|
||||
{
|
||||
[Test]
|
||||
public void EnsureTypeSize()
|
||||
{
|
||||
Assert.LessOrEqual(Unsafe.SizeOf<VoiceUpdateState>(), 0x100);
|
||||
Assert.LessOrEqual(Unsafe.SizeOf<VoiceState>(), 0x100);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,19 +8,19 @@ namespace Ryujinx.Tests.Audio.Renderer.Dsp
|
||||
class ResamplerTests
|
||||
{
|
||||
[Test]
|
||||
[TestCase(VoiceInParameter.SampleRateConversionQuality.Low)]
|
||||
[TestCase(VoiceInParameter.SampleRateConversionQuality.Default)]
|
||||
[TestCase(VoiceInParameter.SampleRateConversionQuality.High)]
|
||||
public void TestResamplerConsistencyUpsampling(VoiceInParameter.SampleRateConversionQuality quality)
|
||||
[TestCase(SampleRateConversionQuality.Low)]
|
||||
[TestCase(SampleRateConversionQuality.Default)]
|
||||
[TestCase(SampleRateConversionQuality.High)]
|
||||
public void TestResamplerConsistencyUpsampling(SampleRateConversionQuality quality)
|
||||
{
|
||||
DoResamplingTest(44100, 48000, quality);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase(VoiceInParameter.SampleRateConversionQuality.Low)]
|
||||
[TestCase(VoiceInParameter.SampleRateConversionQuality.Default)]
|
||||
[TestCase(VoiceInParameter.SampleRateConversionQuality.High)]
|
||||
public void TestResamplerConsistencyDownsampling(VoiceInParameter.SampleRateConversionQuality quality)
|
||||
[TestCase(SampleRateConversionQuality.Low)]
|
||||
[TestCase(SampleRateConversionQuality.Default)]
|
||||
[TestCase(SampleRateConversionQuality.High)]
|
||||
public void TestResamplerConsistencyDownsampling(SampleRateConversionQuality quality)
|
||||
{
|
||||
DoResamplingTest(48000, 44100, quality);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Dsp
|
||||
/// <param name="inputRate">The input sample rate to test</param>
|
||||
/// <param name="outputRate">The output sample rate to test</param>
|
||||
/// <param name="quality">The resampler quality to use</param>
|
||||
private static void DoResamplingTest(int inputRate, int outputRate, VoiceInParameter.SampleRateConversionQuality quality)
|
||||
private static void DoResamplingTest(int inputRate, int outputRate, SampleRateConversionQuality quality)
|
||||
{
|
||||
float inputSampleRate = inputRate;
|
||||
float outputSampleRate = outputRate;
|
||||
@@ -61,8 +61,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Dsp
|
||||
float sumDifference = 0;
|
||||
int delay = quality switch
|
||||
{
|
||||
VoiceInParameter.SampleRateConversionQuality.High => 3,
|
||||
VoiceInParameter.SampleRateConversionQuality.Default => 1,
|
||||
SampleRateConversionQuality.High => 3,
|
||||
SampleRateConversionQuality.Default => 1,
|
||||
_ => 0,
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
|
||||
[Test]
|
||||
public void EnsureTypeSize()
|
||||
{
|
||||
Assert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterEffectParameter>());
|
||||
Assert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterEffectParameter1>());
|
||||
Assert.AreEqual(0x24, Unsafe.SizeOf<BiquadFilterEffectParameter2>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
[Test]
|
||||
public void TestGetReference()
|
||||
{
|
||||
MemoryPoolState[] memoryPoolState = new MemoryPoolState[1];
|
||||
memoryPoolState[0] = MemoryPoolState.Create(MemoryPoolState.LocationType.Cpu);
|
||||
MemoryPoolInfo[] memoryPoolState = new MemoryPoolInfo[1];
|
||||
memoryPoolState[0] = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
|
||||
memoryPoolState[0].SetCpuAddress(0x1000000, 0x10000);
|
||||
memoryPoolState[0].DspAddress = 0x4000000;
|
||||
|
||||
|
||||
@@ -1,413 +0,0 @@
|
||||
using NUnit.Framework;
|
||||
using Ryujinx.Audio.Renderer.Server;
|
||||
|
||||
namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
{
|
||||
public class BehaviourContextTests
|
||||
{
|
||||
[Test]
|
||||
public void TestCheckFeature()
|
||||
{
|
||||
int latestRevision = BehaviourContext.BaseRevisionMagic + BehaviourContext.LastRevision;
|
||||
int previousRevision = BehaviourContext.BaseRevisionMagic + (BehaviourContext.LastRevision - 1);
|
||||
int invalidRevision = BehaviourContext.BaseRevisionMagic + (BehaviourContext.LastRevision + 1);
|
||||
|
||||
Assert.IsTrue(BehaviourContext.CheckFeatureSupported(latestRevision, latestRevision));
|
||||
Assert.IsFalse(BehaviourContext.CheckFeatureSupported(previousRevision, latestRevision));
|
||||
Assert.IsTrue(BehaviourContext.CheckFeatureSupported(latestRevision, previousRevision));
|
||||
// In case we get an invalid revision, this is supposed to auto default to REV1 internally.. idk what the hell Nintendo was thinking here..
|
||||
Assert.IsTrue(BehaviourContext.CheckFeatureSupported(invalidRevision, latestRevision));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestsMemoryPoolForceMappingEnabled()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision1);
|
||||
|
||||
Assert.IsFalse(behaviourContext.IsMemoryPoolForceMappingEnabled());
|
||||
|
||||
behaviourContext.UpdateFlags(0x1);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsMemoryPoolForceMappingEnabled());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision1()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision1);
|
||||
|
||||
Assert.IsFalse(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsFalse(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsFalse(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsFalse(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsFalse(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.70f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(1, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(1, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision2()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision2);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsFalse(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsFalse(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsFalse(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsFalse(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.70f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(1, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(1, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision3()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision3);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsFalse(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsFalse(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsFalse(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.70f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(1, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(1, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision4()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision4);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsFalse(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsFalse(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.75f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(1, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(1, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision5()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision5);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(2, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision6()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision6);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(2, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision7()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision7);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(2, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision8()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision8);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(3, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision9()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision9);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(3, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision10()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision10);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(4, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision11()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision11);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsTrue(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(5, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision12()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision12);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsTrue(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(5, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision13()
|
||||
{
|
||||
BehaviourContext behaviourContext = new();
|
||||
|
||||
behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision13);
|
||||
|
||||
Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourContext.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourContext.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourContext.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourContext.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.IsEffectInfoVersion2Supported());
|
||||
Assert.IsTrue(behaviourContext.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsTrue(behaviourContext.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsTrue(behaviourContext.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsTrue(behaviourContext.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourContext.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(5, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourContext.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
}
|
||||
}
|
||||
413
src/Ryujinx.Tests/Audio/Renderer/Server/BehaviourInfoTests.cs
Normal file
413
src/Ryujinx.Tests/Audio/Renderer/Server/BehaviourInfoTests.cs
Normal file
@@ -0,0 +1,413 @@
|
||||
using NUnit.Framework;
|
||||
using Ryujinx.Audio.Renderer.Server;
|
||||
|
||||
namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
{
|
||||
public class BehaviourInfoTests
|
||||
{
|
||||
[Test]
|
||||
public void TestCheckFeature()
|
||||
{
|
||||
int latestRevision = BehaviourInfo.BaseRevisionMagic + BehaviourInfo.LastRevision;
|
||||
int previousRevision = BehaviourInfo.BaseRevisionMagic + (BehaviourInfo.LastRevision - 1);
|
||||
int invalidRevision = BehaviourInfo.BaseRevisionMagic + (BehaviourInfo.LastRevision + 1);
|
||||
|
||||
Assert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, latestRevision));
|
||||
Assert.IsFalse(BehaviourInfo.CheckFeatureSupported(previousRevision, latestRevision));
|
||||
Assert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, previousRevision));
|
||||
// In case we get an invalid revision, this is supposed to auto default to REV1 internally.. idk what the hell Nintendo was thinking here..
|
||||
Assert.IsTrue(BehaviourInfo.CheckFeatureSupported(invalidRevision, latestRevision));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestsMemoryPoolForceMappingEnabled()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision1);
|
||||
|
||||
Assert.IsFalse(behaviourInfo.IsMemoryPoolForceMappingEnabled());
|
||||
|
||||
behaviourInfo.UpdateFlags(0x1);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsMemoryPoolForceMappingEnabled());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision1()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision1);
|
||||
|
||||
Assert.IsFalse(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision2()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision2);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision3()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision3);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision4()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision4);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.75f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision5()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision5);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision6()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision6);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision7()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision7);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision8()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision8);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision9()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision9);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision10()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision10);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(4, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision11()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision11);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision12()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision12);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRevision13()
|
||||
{
|
||||
BehaviourInfo behaviourInfo = new();
|
||||
|
||||
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision13);
|
||||
|
||||
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
|
||||
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
|
||||
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
|
||||
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
|
||||
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
|
||||
Assert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
|
||||
Assert.IsTrue(behaviourInfo.IsSplitterPrevVolumeResetSupported());
|
||||
|
||||
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
|
||||
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
|
||||
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,18 +4,18 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
{
|
||||
class MemoryPoolStateTests
|
||||
class MemoryPoolInfoTests
|
||||
{
|
||||
[Test]
|
||||
public void EnsureTypeSize()
|
||||
{
|
||||
Assert.AreEqual(Unsafe.SizeOf<MemoryPoolState>(), 0x20);
|
||||
Assert.AreEqual(Unsafe.SizeOf<MemoryPoolInfo>(), 0x20);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestContains()
|
||||
{
|
||||
MemoryPoolState memoryPool = MemoryPoolState.Create(MemoryPoolState.LocationType.Cpu);
|
||||
MemoryPoolInfo memoryPool = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
|
||||
|
||||
memoryPool.SetCpuAddress(0x1000000, 0x1000);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
[Test]
|
||||
public void TestTranslate()
|
||||
{
|
||||
MemoryPoolState memoryPool = MemoryPoolState.Create(MemoryPoolState.LocationType.Cpu);
|
||||
MemoryPoolInfo memoryPool = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
|
||||
|
||||
memoryPool.SetCpuAddress(0x1000000, 0x1000);
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
[Test]
|
||||
public void TestIsMapped()
|
||||
{
|
||||
MemoryPoolState memoryPool = MemoryPoolState.Create(MemoryPoolState.LocationType.Cpu);
|
||||
MemoryPoolInfo memoryPool = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
|
||||
|
||||
memoryPool.SetCpuAddress(0x1000000, 0x1000);
|
||||
|
||||
@@ -4,12 +4,12 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
{
|
||||
class MixStateTests
|
||||
class MixInfoTests
|
||||
{
|
||||
[Test]
|
||||
public void EnsureTypeSize()
|
||||
{
|
||||
Assert.AreEqual(0x940, Unsafe.SizeOf<MixState>());
|
||||
Assert.AreEqual(0x940, Unsafe.SizeOf<MixInfo>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
public void TestInitializeSystemPool()
|
||||
{
|
||||
PoolMapper poolMapper = new(DummyProcessHandle, true);
|
||||
MemoryPoolState memoryPoolDsp = MemoryPoolState.Create(MemoryPoolState.LocationType.Dsp);
|
||||
MemoryPoolState memoryPoolCpu = MemoryPoolState.Create(MemoryPoolState.LocationType.Cpu);
|
||||
MemoryPoolInfo memoryPoolDsp = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Dsp);
|
||||
MemoryPoolInfo memoryPoolCpu = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
|
||||
|
||||
const CpuAddress CpuAddress = 0x20000;
|
||||
const DspAddress DspAddress = CpuAddress; // TODO: DSP LLE
|
||||
@@ -35,8 +35,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
public void TestGetProcessHandle()
|
||||
{
|
||||
PoolMapper poolMapper = new(DummyProcessHandle, true);
|
||||
MemoryPoolState memoryPoolDsp = MemoryPoolState.Create(MemoryPoolState.LocationType.Dsp);
|
||||
MemoryPoolState memoryPoolCpu = MemoryPoolState.Create(MemoryPoolState.LocationType.Cpu);
|
||||
MemoryPoolInfo memoryPoolDsp = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Dsp);
|
||||
MemoryPoolInfo memoryPoolCpu = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
|
||||
|
||||
Assert.AreEqual(0xFFFF8001, poolMapper.GetProcessHandle(ref memoryPoolCpu));
|
||||
Assert.AreEqual(DummyProcessHandle, poolMapper.GetProcessHandle(ref memoryPoolDsp));
|
||||
@@ -46,8 +46,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
public void TestMappings()
|
||||
{
|
||||
PoolMapper poolMapper = new(DummyProcessHandle, true);
|
||||
MemoryPoolState memoryPoolDsp = MemoryPoolState.Create(MemoryPoolState.LocationType.Dsp);
|
||||
MemoryPoolState memoryPoolCpu = MemoryPoolState.Create(MemoryPoolState.LocationType.Cpu);
|
||||
MemoryPoolInfo memoryPoolDsp = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Dsp);
|
||||
MemoryPoolInfo memoryPoolCpu = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
|
||||
|
||||
const CpuAddress CpuAddress = 0x20000;
|
||||
const DspAddress DspAddress = CpuAddress; // TODO: DSP LLE
|
||||
@@ -77,11 +77,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
const int MemoryPoolStateArraySize = 0x10;
|
||||
const CpuAddress CpuAddressRegionEnding = CpuAddress * MemoryPoolStateArraySize;
|
||||
|
||||
MemoryPoolState[] memoryPoolStateArray = new MemoryPoolState[MemoryPoolStateArraySize];
|
||||
MemoryPoolInfo[] memoryPoolStateArray = new MemoryPoolInfo[MemoryPoolStateArraySize];
|
||||
|
||||
for (int i = 0; i < memoryPoolStateArray.Length; i++)
|
||||
{
|
||||
memoryPoolStateArray[i] = MemoryPoolState.Create(MemoryPoolState.LocationType.Cpu);
|
||||
memoryPoolStateArray[i] = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
|
||||
memoryPoolStateArray[i].SetCpuAddress(CpuAddress + (ulong)i * CpuSize, CpuSize);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
public void EnsureTypeSize()
|
||||
{
|
||||
Assert.AreEqual(0xE0, Unsafe.SizeOf<SplitterDestinationVersion1>());
|
||||
Assert.AreEqual(0x110, Unsafe.SizeOf<SplitterDestinationVersion2>());
|
||||
Assert.AreEqual(0x128, Unsafe.SizeOf<SplitterDestinationVersion2>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ryujinx.Tests.Audio.Renderer.Server
|
||||
{
|
||||
class VoiceStateTests
|
||||
class VoiceInfoTests
|
||||
{
|
||||
[Test]
|
||||
public void EnsureTypeSize()
|
||||
{
|
||||
Assert.LessOrEqual(Unsafe.SizeOf<VoiceState>(), 0x220);
|
||||
Assert.LessOrEqual(Unsafe.SizeOf<VoiceInfo>(), 0x238);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,8 @@ namespace Ryujinx.Tests.Audio.Renderer
|
||||
[Test]
|
||||
public void EnsureTypeSize()
|
||||
{
|
||||
Assert.AreEqual(0x170, Unsafe.SizeOf<VoiceInParameter>());
|
||||
Assert.AreEqual(0x170, Unsafe.SizeOf<VoiceInParameter1>());
|
||||
Assert.AreEqual(0x188, Unsafe.SizeOf<VoiceInParameter2>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace Ryujinx.Tests.Memory
|
||||
|
||||
ref PartialUnmapState state = ref PartialUnmapState.GetRef();
|
||||
|
||||
// Create some state to be used for managing the native writing loop.
|
||||
// Create some info to be used for managing the native writing loop.
|
||||
int stateSize = Unsafe.SizeOf<NativeWriteLoopState>();
|
||||
IntPtr statePtr = Marshal.AllocHGlobal(stateSize);
|
||||
Unsafe.InitBlockUnaligned((void*)statePtr, 0, (uint)stateSize);
|
||||
|
||||
Reference in New Issue
Block a user