[b:2d7iglfi]Possible Bug:[/b:2d7iglfi] Loading a non-audio format using FMOD_System_CreateSound() with the NONBLOCKING flag doesn’t report an error with FMOD_Sound_GetOpenState()?

[b:2d7iglfi]Background:[/b:2d7iglfi] I am currently loading sounds in a non-blocking fashion for my latest application. Currently, I am checking all the possible flag results from FMOD_Sound_GetOpenState() and doing the appropriate code logic (example, when ready, start playback).

Recently, I decided to check my code out by loading a non-audio format (exmaple, a plain text file) and to my wonder, the function FMOD_Sound_GetOpenState() never changes to the FMOD_OPENSTATE_ERROR flag (it just stays on the FMOD_OPENSTATE_LOADING flag). This same behavior happens with any file format that Fmod doesn’t support (that I’ve tested so far).

[b:2d7iglfi]Duplication:[/b:2d7iglfi] Create a sound using a non-supported file format with non-blocking (the flags I use are listed below) and then have a loop check the status of the sound using FMOD_Sound_GetOpenState(). In my Game Maker application, the return of GetOpenState() never changes from the loading (when you would expect an error return at some point) under these conditions. Loading a supported file format returns LOADING to READY status, as expected.

The loading flags I am currently using for creating a sound:


Something which may need checking is the inclusion of ACCURATETIME. This might be forcing the load function to try getting the length of the invalid sound, thus keeping it in a loading state…? I will try to do more tests locally to see if this may be a factor.

At the moment, I do not have a C/C++ test example to showcase this error, to which I apologize. So far, I have isolated everything to just Fmod calls (thus, my suspicion of an Fmod bug). If I can find the time, I will try to make a C example showcasing the bizarre behavior. In the mean time, I ask that if anyone (and devs) can confirm or disprove these results, please post in this topic.

EDIT: Forgot to clarify, this is using the latest fmod version for the win32 platform.


  • You must to post comments

In my test loading a pdf with those flags it didnt have any such issue. The error returned as expected with FMOD_ERR_FORMAT.

This is the output of my program.
state = 1
state = 1
Sound loaded! (25) Unsupported file or audio format.
state = 2

accuratetime only takes effect if the format is mp3, or mod/s3m/xm/it, and thats only after it successfully detects one of those formats.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.