0
0

Hey, I’m fairly new to fmod and I really like the ease and simplicity of the library. But I’m having problems receiving FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED.
I’m running on the iOS platform, I create my sound system, grab my event group, then grab my event. After I get my Event I call

[code:bju34vsr]
myEvent->setCallback(SoundManager::EventCallback, myEventWrapperObject);
myEvent->start();

FMOD_RESULT F_CALLBACK SoundManager::EventCallback(FMOD_EVENT *pEventRaw, FMOD_EVENT_CALLBACKTYPE type, void *param1, void *param2, void *userData)
{
switch(type)
{
case FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END:
case FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED:
SOUND_MANAGER->OnSoundStop((SoundObject *)userData);
break;

  default:
    break;
}
cout << type << endl;
return FMOD_OK;

}
[/code:bju34vsr]

I get the following events in this order:
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START

But I never receive an FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED unless I play the event again. I can confirm that I’m using a one shot sound and that it’s not looping. In my update frame I added some debugging to grab the event’s state and it always returns that it is always playing. This is probably why I never recieve the EVENTFINISHED callback but I’m at a lost as to why it doesn’t stop.

  • You must to post comments
0
0

Hmmm, I’m wondering are one shot simple sounds supposed to return a stop event?

  • You must to post comments
0
0

found my problem. I was updating the System, not the EventSystem 😳

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.