ThisKwasior / CryTools

Collection of tools for various CRI Middleware/Criware formats
MIT License
10 stars 1 forks source link

Multiple ADX files in SFD (Multilanguage support) #1

Open JustKarushi opened 2 years ago

JustKarushi commented 2 years ago

I have a question, can I add more .adx files to the .sfd file, and what commands to use for multilanguage?

ThisKwasior commented 2 years ago

I have no idea how this issue escaped me. At this moment it's not possible to mux multiple ADX streams, it's in the works. I don't really understand the multilanguage question though - do you mean audio files with multiple languages?

MarioTainaka commented 2 years ago

Hi there! thanks for making an accessible version of these tools for the masses. Is multi language ADX muxing in the works?

ThisKwasior commented 2 years ago

@MarioTainaka Hello! Release from 4 days ago covers the initial support for this. It does break some stuff though, so if any problem occurs, please use the first release.

Here are some examples of mutliple languages working: https://user-images.githubusercontent.com/3619041/159117968-396edefa-c697-495e-8d54-891da8ea395d.mp4 https://user-images.githubusercontent.com/3619041/159117971-9e7e5601-f509-4fb4-a23f-8652ec7f1508.mp4

MarioTainaka commented 2 years ago

Thanks a bunch! Mind giving me an example of the command argument you have to use if say for example you have one mpeg file with two ADX tracks one English and one Japanese? thanks again!

ThisKwasior commented 2 years ago

This is the command from examples above: sfdmux.exe e0001.sfd bakamitai.mpeg bakamitai_jp.adx bakamitai_en.adx

The order of adx files in input will be the same in the output file (as in, the ID will increment). So as you can see, japanese is the first file available. It all depends on the SFDs you want to replace though.

MarioTainaka commented 2 years ago

Thank you!! i'll try it out in Sonic Generations and report back.

MarioTainaka commented 2 years ago

Just tried out gens the audio for all 5 tracks is completely silent.

MarioTainaka commented 2 years ago

Here's the file in question rename it to ev011.sfd for easy testing and try playing the very first cutscene.

https://drive.google.com/file/d/1VWD3gMcxaCJrV2ESXT_qDsb9zMMCO48G/view?usp=sharing

ThisKwasior commented 2 years ago

Checked it out. I guess it's silent because it uses AIX containers instead of plain ADX or because I didn't finish reverse-engineering the sofdec packet. Either way, I will figure out both in some time. At least video works - that's promising.

MarioTainaka commented 2 years ago

Could you maybe look into creating an AIX converter or encoder? as far as I understand it's a container for the ADX files. I think that's the reason why multiple langagues don't work even when using official tools.

MarioTainaka commented 2 years ago

right now if you encode multiple ADX files with Official tools it will only play the file in slot 1 for all langauges

ThisKwasior commented 2 years ago

I'll look into it, but this week is gonna be tough on free time.

MarioTainaka commented 2 years ago

Thank you!! here are the files I used, keep in mind that all other languages that aren't English (0) or Japanese (1) are copies of the English ADX file.

https://drive.google.com/file/d/1duA7pJzBy3WUgCI9zeYJ1ru3M-kQigc8/view?usp=sharing

MarioTainaka commented 2 years ago

Hey there! any progress on this?

ThisKwasior commented 2 years ago

Sorry, progress has been slow. I will probably have something usable next week

MarioTainaka commented 2 years ago

Please, take your time. I was just wondering if you were alive LOL

ThisKwasior commented 2 years ago

Got some progress done. Will commit changes in few days after I clean up the code.