I have loaded an FSB file in C++, and I’m trying to determine the encoding format of the Sounds it contains. However, all types are indicated as FSB format, which is not the Vorbis or PCM format I chose during packaging. How can I retrieve the format selected during packaging?
You can only play .FSB files with FMOD, so you shouldn’t need to know the encoding format as FMOD will handle decoding it. Is there a specific reason that you need to figure out this information? I may be able to suggest a solution for your given use-case.
My project’s audio adopts the same encoding format, so I need to use C++scripts to batch verify whether there are unexpected situations in the audio format.
I use the following code to read the audio format.
system->createSound(fsb_path, FMOD_DEFAULT, 0, &fsb);
subsound->getFormat(&type, &format, &channels, &bits);
But this code cannot retrieve the encoding format I selected in fmod designer.
Unfortunately, there’s no way to retrieve the encoding format that was set during the bank building process. I can see the use-case for being able to manually verify the format of encoded audio in banks, so I’ve added it to our internal feature/improvement tracker.
That said, the FSBank API is quite robust and well-tested at this point, so while I’m not discounting your desire the verify the format of encoded assets, it’s unlikely that there should be issues. Are you running into any specific errors with your encoded FSB files?
I will consider other ways to achieve the functionality I want, and I have no further questions. Thank you for your help.