Closed lat9nq closed 4 months ago
Vgmstream definitely can read the wem audio files. The bnk files are "encrypted" in 2 header bytes with an XOR key. What did you try that didn't work? Btw, feel free to look at my implementation. I basically rewrote/copied the code of various projects (ww2ogg, bnkextract, vgmstream) and added some of the HD2 specific stuff like the XOR decryption.
Thanks, @xypwn! I was trying to open the files simply by running e.g. vgmstream-cli 193288922.wwise_stream
but I would get an error. As for your filediver program, it would try to find the Steam library in a weird directory by default (~/.local/share/Steam/steamapps/libraryfolders.vdf
is common, but filediver omits the Steam
portion of the directory). I manually specified the game after that, but none of the files would extract (e.g. filediver -g ~/.local/share/Steam/steamapps/common/Helldivers\ 2/ -c "audio:format=source" -i 'content/audio/*.wise_stream'
succeeds with INFO Extracted 0/0 matching files
).
Thanks for the feedback @lat9nq . TBH I haven't actually tested filediver on Linux yet, as I run HD 2 on Windows. It would be great if you could open an issue on filediver's GitHub so we can work on making it function on Linux!
Regarding vgmstream, I read the source code and it explicitly requires wwise stream files to have the ".wem" extension in order to be recognized. Then it should work.
not sure if there's a better way to fix this in code.
It could be changed to only open files when needed for indexing and extracting. While this would slow down Windows significantly, due to the code using a "hidden" mechanic of FILE_SHARE_READ
and FILE_FLAG_RANDOM_ACCESS
, on *nix it would make the application run without adjusting ulimit. As far as I know, there's no current reason to keep ulimit low anyway.
I think prlimit
does what we want in this case?
stingray
andstingray_unit
had issues that prevented me from compiling. Once I got through that, there was an issue withmmap
that caused it to not work, then the program misread the error as a success and ran into a crash. Once I fixed that, I enabled submodules so I could make sense of the files I was getting. This caused all of theopen
calls to error with24
, AKAEMFILE 24 Too many open files
, but I had to put theerrno
in the error message to find that out.Fixed the warning in
stingray
that prevented clang from compiling it with a static cast. Also cleaned up an include there that my IDE told me about.stingray_unit
needed to includevector
so it's there now. AddedMAP_PRIVATE
to themmap
call, so now it functions as it should. Currently I'm runningulimit -S -n 65535
before I run the program so that it the open calls work -- not sure if there's a better way to fix this in code.At this point, I can look at the game's music files, but vgmstream can't read it. I think this is out of scope of this project, though, lol. (Help appreciated)