We have several events that have "Just Fail" as the consequence of exceeding the specified max number of instances. Our sound designer interprets this (and wants this) to mean "Do nothing". So sometimes this behavior is OK because we don’t need the sound to play if we have hit max. However, FMOD does not return FMOD_OK in those cases; it returns FMOD_ERR_CHANNEL_ALLOC. This is problematic because it gives a lot of false positives. A corollary is that there is no way to tell if FMOD couldn’t allocate a channel or if you simply requested more than you allowed for in Designer.
There should be a "Do Nothing" or "Just Fail Without Error" option as well. I don’t want to remove the current functionality because sometimes you DO want it to give an error.
Would this be possible?
- droberts asked 10 years ago
The problem with that is that you would assume the resultant handle from getEvent is valid if FMOD_OK was the result, it is not.
We will probably add some event specific error codes soon, that is just reusing ‘channel alloc fail’ as it is the closest to the reason it fails. Maybe that would make it easier to filter (as channel alloc error may come from a different error type in the lower level system).
I agree, now that I think about it, that "Just Fail" should not retun FMOD_OK. I do think that it should return something unique to its condition because I imagine a channel alloc failure can occur for a number of reasons. However, if it fails because our designer told it to I want to know so that I don’t need to worry about it. Does that make sense?
- droberts answered 10 years ago
Please login first to submit.