0
0

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:

[code:2nou2wvr]
FMOD::EventProject* pEventProject = it->second;
FMOD::EventGroup* pEventGroup = NULL;
FMOD::Event* pEvent = NULL;
if (!pEventProject)
return NULL;
pEventProject->getGroup(eventGroup.c_str(), EVENT_DEFAULT, &pEventGroup);

if (!pEventGroup)
return NULL;

pEventGroup->getEvent(assetName.c_str(), EVENT_DEFAULT, &pEvent);

pEvent->setCallback(MusicEventCallback, NULL);
pEvent->start(); // start the new event
[/code:2nou2wvr]

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.

Thanks!

Salil Apte
Lead Programmer
Super-Ego Games

  • You must to post comments
0
0

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!

Salil Apte
Lead Programmer
Super-Ego Games

  • You must to post comments
0
0

Your version of FMOD is a bit old. I can’t think of a specific release note, but I suspect that it’s fixed in the latest version of FMOD.

  • You must to post comments
0
0

I’m at version 4.06.22 now and that doesn’t seem to have fixed the problem. Any other ideas?

  • You must to post comments
0
0

Hi, I can’t seem to reproduce this. Could you email me a (small) test .FDP that demonstrates the problem? Send it to ben@fmod.org .

Thanks,
Ben

  • You must to post comments
0
0

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!

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.