[Solved] [FMOD] Channel Callback

Started by
0 comments, last by Degra 17 years, 7 months ago
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]
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

This topic is closed to new replies.

Advertisement