We recently decided to use bank encryption in our project but are having issues with encrypted banks loaded from memory.
We are using Studio::System::loadBankMemory(), specifying FMOD_STUDIO_LOAD_BANK_NORMAL as the load bank flags. The result comes back as FMOD_OK but the audio doesn’t work. It appears to behave as though we haven’t set an encryption key.
The same encrypted banks work fine when loaded from file using Studio::System::loadBankFile() with the same load bank flags, and unencrypted banks work fine from both file and memory with the unencrypted flag. The issue seems to be isolated to loading encrypted banks from memory.
We discovered this issue in FMOD studio 2.00.07, but the issue still occurs after upgrading to version 2.01.00.
Thanks for reporting this. After some investigation it looks like loadBankMemory does not work with encryption, and this is something that should be mentioned in the docs.
Will loading encrypted banks from memory be fixed in an upcoming release?
We load banks from both file and memory and would like to enable encryption for both. Without the ability to load the encrypted banks from memory, it will make the encryption feature more difficult to use for our project.
This has not been scheduled as of yet but I’ll see if we can bump up the priority.
I have created a task for this but as a workaround in the meantime, when some banks are unencrypted you can use the FMOD_STUDIO_LOAD_BANK_UNENCRYPTED load flag to ignore the given key.