Firemonkey – Vcl to FMX pointers

  

By DMS JOY – Firemonkey First, sorry for my English, I’m Spanish.

I have a lot of time trying to translate this portion of code from delphi vcl to fmx.
this is the code:

procedure process(Process_samples: Longint);
var
offs: longint;
pBuffer: PSingle;
sum: double;
x: longint;
begin
pBuffer := buffer.ptrBegin; //–>>buffer.ptrbegin is a psingle
for offs := windowStart to windowLen do
begin
sum := 0;
for x := 0 to process_samples – 1 do
begin
sum := sum + pBuffer[x] * pBuffer[x + offs];
end;

end;
end;

I receive this error:

[dcc error] unit1.pas: E2016 Array type required.

I need read a single value from psingle on the position x, and I don’t know how to do this.

Can someone give me help?

I’m newbie in Firemonkey and I want translate my application from delphi vcl to fmx. …read more

Via: StackOverflow

Comments are closed.