I am having serious issues with the result codes being returned by calls to FMOD event library functions that are costing me a lot of time trying to find problems. FYI, I am using FMOD 4.04.41. In general, I would prefer that the error codes and messages were more descriptive and detailed, but here are a couple of specific examples:
[b:x5swnwnp]Trying to start an event that does not exist[/b:x5swnwnp]
When calling EventSystem::getEvent with an invalid event name, the returned result code is: (36) An invalid parameter was passed to this function. This is not helpful. Could we get an error message that says something like ‘Event xxxxx does not exist?’. This would make it much easier to track down these errors.
The code that I am using is something like:
fmodResult = eventProject->getGroupByIndex(index, true, &eventGroup);
fmodResult = eventGroup->loadEventData(FMOD::EVENT_RESOURCE_STREAMS_AND_SAMPLES, EVENT_DEFAULT);
<do some other stuff>
fmodResult = fmodEventSystem->getEvent(eventName, EVENT_ERROR_ON_DISKACCESS, &fmodEvent);
[b:x5swnwnp]Failing due to event max playbacks[/b:x5swnwnp]
When I attempt to start an event but cannot due to reaching max playbacks, the returned result code is: (10) Error trying to allocate a channel. The max playbacks behavior for the event is ‘Just Fail’. This happens when actually setting the event to paused prior to starting it:
FMOD_RESULT fmodResult = fmodEvent->setPaused(true);
Could we get an error code that specifically says that this event has reached max playbacks?
Another related situation: if I have an event with one max playback, then try to start it as follows:
fmodResult = eventSystem->getEvent(eventName, EVENT_ERROR_ON_DISKACCESS, &event1);
fmodResult = eventSystem->getEvent(eventName, EVENT_ERROR_ON_DISKACCESS, &event2);
<do some other stuff>
fmodResult = event1->setPaused(true);
fmodResult = event2->setPaused(true);
I get some weird results. Trying to pause event1 will return: (35) An invalid object handle was used, and pausing event2 will work fine. I would expect that event1 would play fine, then event2 would ‘Just Fail’. I would also expect an error message that said exactly what happened, something about the event reaching max playbacks.
[b:x5swnwnp]Trying to start an event[/b:x5swnwnp]
I haven’t figured out what is going on with this one yet, but when trying to start an event I am getting: (71) A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.
I have no idea what that means. I can see nothing unusual about this specific event compared to others that start ok. Any ideas what this error might mean?
[b:x5swnwnp]Failing to update the event system[/b:x5swnwnp]
Sometimes, generally after getting spammed by a few other errors, I start receiving the following after calling EventSystem::update(): (36) An invalid parameter was passed to this function. This seems really strange given that function takes no parameters at all.
Generally things are pretty hosed due to previous errors when this happens so I don’t know what, if anything, is really wrong. I suspect the real problem is something that happened earlier and I need to look at the other error messages first. However, if a function call is going to return some sort of error code, I would prefer that it make sense and be helpful rather than confusing matters more.
- Magog asked 12 years ago
I am on v49 now and I am still getting "An invalid parameter was passed to this function." continuously after calling EventSystem::update on the PC. I am hearing audio but I do not know if the error is erroneous. I do not get this response from EventSystem::update on the Xbox 360.
- droberts answered 12 years ago
An update on this. I figured out what was causing the error: (71) A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.
I had some 3D HW sounds, and based on something I read in a another post I changed the wave bank to force software. That fixed the problem.
I would still expect to see a better error message than the one originally returned, so that I could figure out exactly what was going on.
- Magog answered 12 years ago
Please login first to submit.