Hi all,
I modified the simple_event.cpp provided with the API examples solution, here the change:
//... same as before (simple_event.cpp)....
FMOD::Studio::ID explosionID = {0};
ERRCHECK( system.lookupEventID("/Explosions/Single Explosion", &explosionID) );

FMOD::Studio::EventDescription eventDescription;
ERRCHECK( system.getEvent(&explosionID, FMOD_STUDIO_LOAD_BEGIN_NOW, &eventDescription) );

FMOD::Studio::EventInstance eventInstance;
ERRCHECK( eventDescription.createInstance(&eventInstance) );


    if (Common_BtnPress(BTN_ACTION1))
        // One-shot event
        ERRCHECK( eventInstance.start() );
//... continue as before (simple_event.cpp)....


I expected to have the same behaviour of the "cancelInstance" (restart if already playing)…but the explosion doesn’t restart if I press BTN_ACTION1 (in this case "1") again and again.
I have the same (odd) behaviour with the "Single-Shot Random" event.
The "restart if already playing" is valid with "simple Event Sound" only?
Bye, Salvo

  • You must to post comments

Thanks for reporting this bug. We will fix it, but for now you should be able to work around it by stopping the event before restarting it.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.