-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.ADX encoding loop / DC #10
Comments
Hello, thanks for reporting the issue. I am missing some of the details of whatever the original game is. Wish you can send me a sample ADX file from the original game, and the script you used to convert it. PS: ADXPlay (library used by criware for ADX playback) is in itself feels uncomplete. So there could be many possible option for why this wouldn't work. Possibly AINF/CINF information needed with the ADX or possibly more. |
Sure, https://github.com/Kochise/dreamcast-docs/blob/master/SDK/EXES/INSTALL%20KATANA%20SDK/INPUT/R10.1_000518/Utl/Gfx/Conv/Movie/ADX/adxencd.exe An example of looping / not-looping ADX: |
Alright, so I went and fixed the ADX decoding after discovering I couldn't decode looping ADXs with it. The encoding actually works well, and matches with "Adxencd" on the Dreamcast on all counts except one: "Dataoffset". As far as I know this actually has no effect on the result. Except in one possible edge case, possibly the dreamcast's "ADXPLay" checks the size of it to set the looping flag. Try the new patch and see if it works, make sure of couple of things: from PyCriCodecs import ADX
wav_bytes = open("wav_file.WAV", "rb").read() # To be a looping WAVE, it *must* have a SMPL chunk.
adx_bytes = ADX.encode(wav_bytes, AdxVersion=3) # The ADX files you sent are using version 3, this usage was specified in the wiki.
open("adx_file.adx", "wb").write(adx_bytes) Mainly the presence of a SMPL chunk, and the specification of "AdxVersion" parameter. |
Unfortunately it didn't work, the ADX is completely silent in game. |
I published a new update that I lazily wrote in the past weeks due to being busy, in the sample provided it works well on setting the loop points. The bug was on writing the loop values wrong, in offset and in value. And those now should be resolved. Install again and try, tell me how it goes. |
Albeit audio plays, it does crash on loop. |
Adding up to data alignment with header changes to A couple of observations to note by checking several DC ADX v3 examples: When loop start is set to
i.e:
I may suggest to test |
Regardless of specifying loop points or not in .WAV via SMPL chunk, the resulting ADX won't loop on Dreamcast.
The text was updated successfully, but these errors were encountered: