0
0

Hi, I’m here again…
I downloaded the last version of fmod, but a problem occured… I set the callback function with FSOUND_Stream_SetSyncCallback. When the callback function is called (when a sync point is reached), it does the right things. But then this function returns true, and when it returns, an error occur (unhandled exception)…
I was using the version 3.63 , and my program was working well… when I upgraded to version 3.70, this problem came… How can I solve this problem??

  • You must to post comments
0
0

There was a big notice in the changes text that stated that callbacks are now stdcall, not cdecl as they were previously. You will have to add the stdcall declaration to your callback function and all will be well.

Why the change? Because stdcall is more widely supported than cdecl. Actually, just blame VB for this one. :)

  • You must to post comments
0
0

Thanks…but… how do I do add the stdcall declaration??
Here’s my code

//the callback function is set here
FSOUND_Stream_SetSyncCallback(stream,
(FSOUND_STREAMCALLBACK)Tratar_Sync_Point,0);

//the callback function
signed char Tratar_Sync_Point(FSOUND_STREAM *stream,void *buff,int len,int param)
{
printf(“sync point reached\n”);
return true;
}

  • You must to post comments
0
0

I believe you just add the stdcall keyword between the return type and the function name. Note that I am not that strong in that particular area of C/C++.

  • You must to post comments
0
0

that worked… I was trying to add (__stdcall*) , but this didn’t work …
I put just __stdcall, and all worked… thanks 😀

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.