"FSBank Error: The format of the source file is invalid."

Hi, I have been trying to automate a process for building FSBs using the FSBANK api but I am running into an error when trying to build some banks “The format of the source file is invalid.”:

std::vector<const char*> fileNames; // absolute paths to .wavs

FSBANK_SUBSOUND subSound = {};
subSound.fileNames = fileNames.data();
subSound.numFiles = static_cast<unsigned int>(fileNames.size());

const FSBANK_SUBSOUND* subSounds = &subSound;

fs::path fsbPath = dir / (stem + ".fsb");

std::cout << "Building FSB: " << fsbPath << "\n";
ERRCHECK(FSBank_Build(subSounds, 1, FSBANK_FORMAT_PCM, FSBANK_BUILD_DEFAULT, 0, nullptr, fsbPath.string().c_str()));

It’s only some of my banks that get this error too.

But what gets me is that using fsbank.exe seems to happily build the bank with the same .wavs!


.

I also get the error “An invalid parameter has been passed to this function.” on FSBank_Build for some other banks – while these .wav files also build successfully in fsbank.exe.

What am I missing?

Hi! If possible, could I get you to upload the problem wavs to your FMOD user profile for me to take a look at on my end?