I am using FMOD version 0x00040614. I am currently trying to get a looping FMOD event playing in-engine and I seem to having trouble getting it to work. The code to load my event looks like:
FMOD::EventProject* pEventProject = it->second;
FMOD::EventGroup* pEventGroup = NULL;
FMOD::Event* pEvent = NULL;
pEventProject->getGroup(eventGroup.c_str(), EVENT_DEFAULT, &pEventGroup);
pEventGroup->getEvent(assetName.c_str(), EVENT_DEFAULT, &pEvent);
pEvent->start(); // start the new event
I get two callbacks: one EVENT_CALLBACKTYPE_SOUNDDEF_INFO and one EVENT_CALLBACKTYPE_SOUNDDEF_START but I never hear the sound play. Now, if I open up FMOD designer and connect to my engine and if I literally select the event’s volume slider (which is already set to 0dB), the event starts playing. I don’t slide the volume up or down but I just click the widget which seems to send a volume event change and causes the event to play. Has anyone seen this problem? I’m guessing I’m doing something really stupid so any help would be appreciated.
- sapte asked 10 years ago
Once again, I get the cake for a lame bug on my side.
I was first using just the basic FMOD system and was therefore calling the System’s update method in my main loop. At a later date, I upgraded to the FMOD event system and was NOT calling the EventSystem’s update. This results in some very odd behavior: events defined through Designer that do not require work to be performed over time (such as fading) work fine but those that DO just flat out do NOT work. Connecting to the engine with Designer must force update calls to the EventSystem and that’s what was causing the strange symptoms I was seeing. I’ll chalk another bug up to user error.
Thanks for all the help!
More information. I created two very basic events that point to sound events with nothing complicated in them meaning no fade in/out, no randomization, etc. Playing these events in engine works no problem. However, when I defined a fade in time to the event, that’s when the problems begin. If I define any sort of fade in (no out), the event will not start playing until I connect to the engine via FMOD Designer. Also, if I define just a fade out on an event, the event will play but the moment I try to stop it, it won’t stop playing. When I hadn’t defined a fade out time, the event stopped no problem.
What gives? Thanks!
Please login first to submit.