0
0

Hello!

I’m trying to get a DSP-Callback work in Delphi. But I don’t get it work. Could someone please post a few lines of code, which showes, how to add a function?

I’ve tried:
[code:290p11yg]var
MyFilterUnit : Pointer;
MyFilter : TFSOUNDDSPCALLBACK;
...
function MyFilterCallback(OriginalBuffer: Pointer; NewBuffer: Pointer; Length, Param: Integer): Pointer;
begin

end;
...
MyFilterUnit:=FSOUND_DSP_Create(MyFilterCallback, FSOUND_DSP_DEFAULTPRIORITY_USER, 0);
FSOUND_DSP_SetActive(MyFilterUnit, True);[/code:290p11yg]
But I don’t know, how to combine or use all these things.

Hope someone could help me,

Wulf

  • You must to post comments
0
0

I think I solved my problem. So for everyone here, who has the same problem, here is the code for an own DSP-Function:

var
MyFilterUnit : PFSOUND_DSPUNIT;

function MyFilterCallback(OriginalBuffer: Pointer; NewBuffer: Pointer; Length, Param: Integer): Pointer; cdecl;
begin
Result:=NewBuffer;
end;

MyFilterUnit:=FSOUND_DSP_Create(@MyFilterCallback, FSOUND_DSP_DEFAULTPRIORITY_USER, 0);
FSOUND_DSP_SetActive(MyFilterUnit, True);


My fault was the missing cdecl; after the DSP function.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.