When returning FMOD_ERR_FORMAT from a custom codec open callback to let FMOD know a codec is not capable of opening the file format specified, FMOD used to try other codecs before failing completely. It now fails right away no matter what priority is passed to registerCodec.
- c0diq asked 3 years ago
The problem is not with the priority but rather that the data returned by codec->fileread is not correct and thus the codec crashes.
Try opening an mp3 or m4a file with a codec registered with priority 0. It crashes nicely.
Opening ogg file seems to bypass any custom codec even when registered with a priority 0.
You’re right, priority is irrelevant.
My test simply opens an mp3, returns FMOD_ERR_FORMAT from the open callback, then it continues to successfully open as an mp3 using the built in mp3 codec.
I’m not sure what ogg or mp3 really have to do with the behaviour, it makes no difference to the system. I changed it to ogg and the file opens as ogg correctly.
It sounds to me like you’re not returning FMOD_ERR_FORMAT in the right place. You’re doing it in the open callback and not the read callback right? You shouldnt be getting any read callbacks if you failed the codec open on the open call.
Please login first to submit.