fix(ajm): accept Gen5 codec types (#526)

This commit is contained in:
jute-ado 2026-07-22 17:24:06 +02:00 committed by GitHub
parent 5f97031df5
commit d3600c9255
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View File

@ -17,7 +17,7 @@ public static class AjmExports
private const int OrbisAjmErrorCodecAlreadyRegistered = unchecked((int)0x80930009);
private const int OrbisAjmErrorCodecNotRegistered = unchecked((int)0x8093000A);
private const int OrbisAjmErrorWrongRevisionFlag = unchecked((int)0x8093000B);
private const uint MaxCodecType = 23;
private const uint MaxCodecType = 25;
private const int MaxInstanceIndex = 0x2FFF;
private static readonly ConcurrentDictionary<uint, AjmContextState> Contexts = new();
private static int _nextContextId;

View File

@ -80,6 +80,19 @@ public sealed class AjmExportsTests : IDisposable
Assert.Equal(InvalidContext, RegisterCodec(contextId + 1, 1));
}
[Theory]
[InlineData(23u)]
[InlineData(24u)]
public void Gen5CodecTypesCanRegisterAndCreateInstances(uint codecType)
{
var contextId = Initialize();
Assert.Equal(0, RegisterCodec(contextId, codecType));
Assert.Equal(
0,
CreateInstance(contextId, codecType, 0x401, InstanceAddress));
}
[Fact]
public void InstanceDestroy_RejectsUnknownContextAndSlot()
{