Greetings. I’m trying to set my game’s global mount to a multifile which is encrypted but it doesn’t seem to work correctly As I always get errors regarding that it couldn’t load an audio file in a folder with the same name as my multifile, next to my main .py file. I know what this is. It is trying to load the audio file from a folder with the same name as the multifile after it failed to load it from the multifile itself. But here’s the thing. First of all, I’m able to mount the file without any problems when the multifile isn’t encrypted. As soon as I replace the multifile with an encrypted version of it, These errors pop up and no audio plays at all. Second, I can extract the said audio file by opening the multifile as openRead, then setting the encryptionFlag to True, and setting the encryptionPassword to whatever the password is set when I was packing the multifile and then calling Multifile.extractSubfile(NumberOfSubfile, WhereToExtract). This works fine and I can even play the extracted audio with my generic media player.
The problem seems to show up when I’m trying to mount the multifile as the global mount.
The following lines contain the related code to my problem:
from panda3d.core import VirtualFileSystem, Multifile, Filename #the following lines are inside my class. self.sounds=Multifile() self.sounds.openRead('sounds.mf') self.sounds.setEncryptionFlag(True) self.sounds.setEncryptionPassword("password") self.vfs=VirtualFileSystem.getGlobalPtr() print("loading. Please wait... ") if self.vfs.mount("sounds.mf", "sounds", VirtualFileSystem.MF_read_only, "password"): auto.speak("Done") self.sounds.extractSubfile(2, Filename(self.sounds.getSubfileName(2)))
I’m using audio3DManager to play my audio files.
Thanks for reading