Building banks succeeds, loading fails

(Jan) #1

This isn’t a question but rather a bug report.

I have now wasted quite a bit of time on stuff that is simply bad usability.

  1. In the Mixer window I once added a Send->Reverb to the Master Bus. Build works fine, no warnings whatsoever. Runtime just hangs on loading the soundbank.
  2. Similarly I added a Send->Reverb to something else (maybe the reverb itself, can’t remember, I clicked on many things). Build succeeds, no warnings whatsoever. Runtime seems to be loading ok, but then complains it cannot find any event. Undoing that one step fixed it again.
  3. I saw a video where someone said you’d turn a 3D sound into a 2D sound by deleting that one 3D part from the deck in an event. Did that, again, build succeeds (sensing a pattern here), runtime fails to load the soundbank with FMOD_ERR_NOTREADY.
  4. I did something else, not sure what, now soundbank fails to load with FMOD_ERR_INTERNAL. Randomly removing things I might have added fixed it again.

This is not helpful. When I create some invalid configuration I expect that I get an error on export, pointing out what I might have done wrong. Crashing or hanging the game on soundbank load or simply not working is not an option. How is anyone supposed to debug that, once you have multiple soundbanks that are only loaded on demand ?

(Jan) #2

Regarding FMOD_ERR_INTERNAL, I have two projects (because of another bug, that I am trying to fix and I wasn’t sure what’s going on so I added a fresh project). Both export their differently named soundbanks into the same directory. Still they seem to affect each other. I now got the same error again. Without changing anything else, I just deleted the soundbanks, then exported first the project that writes “Master” then exported the project that exports a bank with a custom name, now the error is gone.

(リチャード清水) #3

Hello Jan,

Sorry to hear about the problems you’re having.

Unfortunately I cannot seem to reproduce the errors you’re facing with a few different builds.

Could you please provide your project and game code along with which version of FMOD Studio you’re using to for us to investigate further?


(Jan) #4

I have identified one error properly now.

Once you set FMOD_STUDIO_INIT_LIVEUPDATE during initialization, loading a sound bank will fail with FMOD_ERR_NOTREADY when you run a SECOND process that uses fmod.

I did send you a sample app, you can easily test this, just add the flag and run the process twice, the second instance will fail.

This is independent of whether an fmod Studio application is running. I guess it uses some OS wide resource internally and while initialization works fine, somehow sound bank loading cannot handle this.

This is a bit unfortunate, since the way our engine works, it is quite common to start a second instance in parallel. While I can see that actually connecting to two different instances might not work, it should at least degrade gracefully or better, return an error code during initialization, such that I can see that another instance is already running, and try to initialize it again without the flag.

(リチャード清水) #5

Hello Jan,

That seems to be correct. When FMOD_INIT_LIVEUPDATE is used, it opens up a system-wide port to be used to connect to FMOD Studio.

If you wish to use FMOD_INIT_LIVEUPDATE with multiple instances of FMOD, you will need to call FMOD_ADVANCEDSETTINGS and set the profilePort to be something new for each instance. Please note that FMOD_ADVANCEDSETTINGS needs to be set before initializing FMOD.

For example:

settings.cbSize = sizeof(settings);
settings.profilerPort = 1234;



You may need to have some smarts in place for detecting which ports are being used if you wish to have Live Update enabled for each instance.

Let me know if this has helped.


(Jan) #6

That’s good to know, thanks. Currently I am fine with having live update for the first instance that was started, but who knows for how long. I am currently working around this with a system wide named mutex, and don’t add the live update flag, when another instance is already running.

That said, I still think you should change it, that either the initialization fails or returns some kind of information that live update with the default setting won’t work, and make sure that it doesn’t result in a failure when loading a bank, as this is pretty difficult to track down and not obvious at all.

(リチャード清水) #7

Thanks for your suggestion, Jan. I’ve passed it onto our development team.