void LowpassFilter(int32_t order,Double *arrayData,Double sampleF,Double HighCutoff,Double Lowcutoff,Double *filterData,Int32_t *error,Int32_t Len,Int32_t Len2);
下面是我的DELPHI声明procedure LowpassFilter(order:Integer;Input:pDouble ;SamplingFredFs,highCutoffFreqfh,LowPassFreqFl:Double;Output:PDouble;error:PInteger ;len1:Integer ;len2:Integer);stdcall ;external 'SharedLib.dll'现在就是报内存地址越界错误,不知道怎么回事
下面是我调用的示例procedure TForm1.btn1Click(Sender: TObject);
var
a:array[0..1] of double ;
b:array[0..1] of double ;
err:PInteger ;
begin
a[0]:=5;
a[1]:=6;
b[0]:=0;
b[1]:=0;
LowpassFilter(2,@a[0],2000.0,2000.0,200.0,@b[0],err ,2,2);
ShowMessage(FloatToStr(b[0]));
end;end.
都弄成
a:array[0..254] of double ;
b:array[0..254] of double ;
记得要初始化下。