I am coding a reverb effect and would like to put the callback funtion in a class appart of the application manager.
By taking a view at dsp custom example I have code an AudioManager that inits Fmod and manager all flow, also I want to make the dsp effect in another class.
So, at the initialization of the audio manager I put this code:
Create the DSP effects.
memset(&dspdesc, 0, sizeof(FMOD_DSP_DESCRIPTION)); dspdesc.channels = 0; // 0 = whatever comes in, else specify. dspdesc.read = &ReverbDsp::myDSPCallback; dspdesc.userdata = (void *)0x12345678; result = system->createDSP(&dspdesc, &reverbDsp); ERRCHECK(result); }
And i have a class named ReverbDsp defining myDSPCallback like this:
FMOD_RESULT F_CALLBACK ReverbDsp::myDSPCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels)
All this stuff generates the following compiler error:
[quote:1lghddq6]Error 1 error C2440: ‘=’ : cannot convert from ‘FMOD_RESULT (__stdcall ReverbDsp::* )(FMOD_DSP_STATE *,float *,float *,unsigned int,int,int)’ to ‘FMOD_DSP_READCALLBACK’ J:\Tgk\Projects\Audio\Reverb\Reverb\Reverb\AudioManager.cpp 51 1 Reverb
I am new to fmod and currently remembering c++ coding, so sorry if my question seems silly 8)
- You must login to post comments