0
0

Hi,
I´m trying to put this callback into a class:

FMOD_RESULT F_CALLBACK myclass::myDSPCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels);

but I don´t know how to set the callback.

void myclass:: …
{

dspdesc.read = myDSPCallback; ??? doesn´t work.
}

Can you help me please ?
thanks …

  • You must to post comments
0
0

Oh I forgot:

dspdesc.read = myDSPCallback ( error C2440: ‘=’ : )

cannot convert from ‘FMOD_RESULT (__stdcall myclass::*)(struct FMOD_DSP_STATE *,float *,float *,unsigned int,int,int)’ to ‘FMOD_RESULT (__stdcall *)(struct FMOD_DSP_STATE

I´m using MFC.
What am I doing wrong ?

  • You must to post comments
0
0

Don’t use a class member function as your callback. Use a normal function and pass a pointer to your class in setUserData and then call the class function from there.

  • You must to post comments
0
0

Yes, thank you. I did this already now.
kind regards
frotti.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.