hozuki / libcgss

libcgss is a helper library for THE iDOLM@STER Cinderella Girls Starlight Stage (CGSS/DereSute/デレステ). It currently supports HCA audio decoding and ACB exploring. It also applies to other games like THE iDOLM@STER Million Live! Theater Days (MLTD/MiriShita/ミリシタ).
Other
94 stars 8 forks source link

acb2wavs doesn't support looping? #8

Closed Rohul1997 closed 5 years ago

Rohul1997 commented 5 years ago

Hello I don't think acb2wavs supports looping or am I doing something wrong? A track from Dragalia Lost gets outputted with a length of 1:29 when its actually meant to be 3:25. I've attached the acb and awb files that I tried with. raid.zip

hozuki commented 5 years ago

acb2wavs does not support looping by default...

But is the time alright? I mean, the decoded time equals to overall time (with looped content only plays once).

Rohul1997 commented 5 years ago

I believe the time is alright.

If not by default then how do I get it to loop? I've been using vgmstream for a lot of the tracks which are looped automatically but I've come across a couple tracks that just get exported as static noise. I've tried those tracks with acb2wavs and they get exported correctly but just not looped.

ActualMandM commented 5 years ago

Those tracks that are static noises don't have their subkeys baked into vgmstream yet: it should only be anything from and past the Lost Heroes event along with most sound effects/voice clips.

Rohul1997 commented 5 years ago

Oh yes that's right. Also thanks I managed to get it to work with vgmstream by giving it the correct subkeys

hozuki commented 5 years ago

To enable looping you can modify the fields in decoderConfig: https://github.com/hozuki/libcgss/blob/56041aa0fa8ad371bc892636d917b9876b6dfcae/src/apps/acb2wavs/acb2wavs.cpp#L172


vgmstream is like a de facto standard... I start to think I should make a utility that generates companion .hcakey for vgmstream from acbs. Then it does not have to bake those keys in the code.

Rohul1997 commented 5 years ago

Oh nice. Also that would actually be super useful if you could do that. Thanks for your help

hozuki commented 5 years ago

@Rohul1997 The new release contains a utility to do that. But you still have to get the main key yourself.

Rohul1997 commented 5 years ago

Ayy thanks a lot. I've just tried it and it kinda works how its meant to. For some Dragalia Lost tracks .bin files get exported which are also .hca files that are normally separate vocal and instrumental tracks. The problem is using acb2hcas the .bin files that get exported inside the external folders are files filled with zeros in hex. Other than that the .hca and .hcakey files that get exported work fine with vgmstream.

hozuki commented 5 years ago

I guess you meant "internal folders".

Well, it may be another "linking" or "aliasing". And they are filled with zeroes, for unknown reasons. You can check out the internal AWB in raid.acb. (Search for "AFS2" in a hex editor.)

Rohul1997 commented 5 years ago

No no I actually did mean the external folders because when using acb2wavs it exported to external and those .bin files if you rename them to .wav they play. So it should be the same with acb2hcas only difference is those .bin files should just be renamed to .hca but the problem is they are filled with zeroes and so contain nothing.

Rohul1997 commented 5 years ago

Oh so when I use the -n parameter it gives 1 .hca file with the name and 2 .bin file inside the external folder. The .hca file is fine and has the correct content but the 2 .bin files are filled with zeroes.

When I don't use the -n parameter it gives 3 .bin files inside the external folder. All 3 are .hca files and do have the correct content inside.

The same file names + extensions are exported inside the internal folder but those are just couple kb files that don't have the actual content.

hozuki commented 5 years ago

It's weird, the name should not affect reading streams. Anyway this should be fixed in a new release.

Rohul1997 commented 5 years ago

Thanks! Just tried and it works perfectly now. I guess I can close this now.