0
0

Hello..
I’m trying to do this:


function EndCallback(Stream: PFSoundStream; Buff: Pointer; Length, Param: Integer): ByteBool;

var
FEndCallback: TFSoundStreamCallback;
begin
FEndCallback := EndCallback;
FSOUND_Stream_SetEndCallback(FSong.Stream, FEndCallback, 0);


Somehow, the compile claims that there are incompatible types “Calling conventions differ”.

Anyone that have a tip?

Thanks in advance,
Mikael Stalvik

  • You must to post comments
0
0

Callbacks should be specified as cdecl. Add the cdecl specifier to the end of your function declaration and it should work.

  • You must to post comments
0
0

[quote:3662xu39]
On 2002-02-21 13:51, Sly wrote:
Callbacks should be specified as cdecl. Add the cdecl specifier to the end of your function declaration and it should work.
[/quote:3662xu39]

Thanks for the reply. Unfortunately, that didn’t work neither. The compiler now claims “Incompatible typs: regular procedure and method pointer”. Why??

Regards,
Mikael Stalvik

  • You must to post comments
0
0

The callback cannot be a method of a class. It must be a normal function.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.