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.