Sign in to follow this  
Degra

[Solved] [FMOD] Channel Callback

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
*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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this