I’ve been searching for documentation or examples all around but could not find any unfortunately, so I’m asking here.
The sound plays fine, and the callback is triggered upon the song ending, however the sync point i setup
FMOD_SYNCPOINT *ptr;
pNewSound->pStartPtr->addSyncPoint(0, FMOD_TIMEUNIT_MS, “test”, &ptr);
is never triggered
I tried several timings but to no avail.
The sound is created via direct memory access
result = pSystem->createStream((const char *)pBufferIntro, FMOD_OPENMEMORY | FMOD_CREATESTREAM , &infoIntro, &pNewSound->pStartPtr);
pSystem->playSound(pNewSound->pStartPtr, pNewSound->pChannelGroupPtr, true, &pNewSound-pChannelPtr);
And the callback is set like this
pNewSound->pChannelPtr->setCallback((FMOD_CHANNELCONTROL_CALLBACK)Test);
With the callback function itself being
FMOD_RESULT F_CALLBACK Test(FMOD_CHANNELCONTROL *channelcontrol, FMOD_CHANNELCONTROL_TYPE controltype, FMOD_CHANNELCONTROL_CALLBACK_TYPE callbacktype, void *commanddata1, void *commanddata2)
{
if ( callbacktype == FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT )
DevMsg(“Syncpoint callback triggered\n”);
else
DevMsg(“Generic callback message: %d\n”, callbacktype);return FMOD_OK;
}