• Advertisement
Sign in to follow this  

[Solved] [FMOD] Channel Callback

This topic is 4182 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to setup a channel callback, but the compiler keeps spitting this annoying error at me... error C2664: 'FMOD::Channel::setCallback' : cannot convert parameter 2 from 'FMOD_RESULT (__cdecl *)(FMOD::Channel *,FMOD_CHANNEL_CALLBACKTYPE,int,unsigned int,unsigned int)' to 'FMOD_CHANNEL_CALLBACK' pointing to this line... channel->setCallback(FMOD_CHANNEL_CALLBACKTYPE_END, &trackEnd, 0); This is my callback function, taken straight out of the FMOD Ex Programmer's Guide: FMOD_RESULT F_CALLBACK trackEnd(FMOD::Channel *channel, FMOD_CHANNEL_CALLBACKTYPE type, int command, unsigned int commanddata1, unsigned int commanddata2); If I change the callback to: FMOD_RESULT F_CALLBACK trackEnd(FMOD::Channel *channel, FMOD_CHANNEL_CALLBACK type, int command, unsigned int commanddata1, unsigned int commanddata2); the compiler still tells me... error C2664: 'FMOD::Channel::setCallback' : cannot convert parameter 2 from 'FMOD_RESULT (__cdecl *)(FMOD::Channel *,FMOD_CHANNEL_CALLBACK,int,unsigned int,unsigned int)' to 'FMOD_CHANNEL_CALLBACK' I've been trying to solve this for ages. It's probably something really stupid I missed. Has anyone got any ideas? Degra [Edited by - Degra on September 9, 2006 7:10:32 AM]

Share this post


Link to post
Share on other sites
Advertisement
*Smacks face* - it was something really stupid lol.
For some reason I had changed..
FMOD_RESULT F_CALLBACK trackEnd(FMOD_Channel *channel, FMOD_CHANNEL_CALLBACKTYPE type, int command, unsigned int commanddata1, unsigned int commanddata2);

to
FMOD_RESULT F_CALLBACK trackEnd(FMOD::Channel *channel, FMOD_CHANNEL_CALLBACKTYPE type, int command, unsigned int commanddata1, unsigned int commanddata2);

Degra

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement