feat(dmr): add receive frontend and AMBE adapter

This commit is contained in:
2026-07-14 18:38:39 +03:00
parent f33a1fbd0a
commit 53a3681618
20 changed files with 998 additions and 30 deletions
+31
View File
@@ -0,0 +1,31 @@
program dmr_bindings_test;
{$MODE Delphi}
uses
SysUtils, DMRBindings;
var
Decoder: Pointer;
Bits: array[0..DMR_AMBE_BITS - 1] of Byte;
PCM: array[0..DMR_PCM_SAMPLES - 1] of Single;
Info: TDMRMbeResult;
begin
if not DMRLoad then
begin
WriteLn(DMRLastError);
Halt(1);
end;
Decoder := DMRMbeCreate(3);
if Decoder = nil then Halt(2);
try
FillChar(Bits, SizeOf(Bits), 0);
Bits[0] := 2; // ABI must reject values other than 0/1 before mbelib.
if DMRMbeDecode(Decoder, @Bits[0], @PCM[0], @Info) <> -2 then Halt(3);
DMRMbeReset(Decoder);
finally
DMRMbeDestroy(Decoder);
DMRUnload;
end;
WriteLn('DMR native bindings tests passed');
end.