I have a problem with the banks being loaded being empty when trying to use them.
I have tried two banks, the first master.bank with 8 events and a smaller testbank.bank with one event. Loading the first gives 8 empty banks and the second gives 1 empty bank so something is loaded but not the contents of the banks. I am using version 2.03.02 (Early Access) both for the studio editor that exports the banks and for the engine.
I initialize like this (C#):
public override void _Ready()
{
// Create FMOD Studio system
FMOD.Studio.System.create(out studioSystem);
studioSystem.initialize(512, FMOD.Studio.INITFLAGS.NORMAL, FMOD.INITFLAGS.NORMAL, IntPtr.Zero);
GD.Print(“FMOD Studio system initialized.”);
}
Load like this:
public bool LoadBank(string bankPath)
{
// Convert the relative Godot path to an absolute path on the system
string absoluteBankPath = ProjectSettings.GlobalizePath(bankPath);
GD.Print("Loading bank from: " + absoluteBankPath);Bank bank; FMOD.RESULT result = studioSystem.loadBankFile(absoluteBankPath, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out bank); if (result == FMOD.RESULT.OK) { GD.Print("Bank loaded successfully: " + absoluteBankPath); return true; // Indicate success } else { GD.Print("Failed to load bank: " + result); return false; // Indicate failure }
}
And then do a check like this:
public void ListAllEventsInBank()
{
studioSystem.getBankList(out Bank banks); // Get all banks currently loaded
foreach (var bank in banks)
{
bank.getPath(out string bankPath); // Get the path of the bank
GD.Print("Listing events in bank: " + bankPath);// Get all events in this bank bank.getEventList(out EventDescription[] events); foreach (var eventDescription in events) { eventDescription.getPath(out string eventPath); // Get the path of each event GD.Print("Event: " + eventPath); } }
}
Is there some extra step needed, or should I use some other settings? Another flag? Or, should they be retrieved in another way? What is going on? Since I get no error codes initializing the system or loading the bank you would suggest things are Ok but when retrieving the banks they are there in the correct number but empty and cannot be retrieved with contents or played.