JayFoxRox / xbox-tools

A collection of tools related to original Xbox
62 stars 11 forks source link

Using ADPCM Decoding/Encoding #77

Closed ghyujkilop closed 2 months ago

ghyujkilop commented 2 months ago

Hey

I couldn't find this tool on your main page, so I'm wondering, I'm trying to convert my wav files to use to replace them in a .xwb for an original xbox game, how do I get your software & use it to convert my standard .wav files to a format that will play well in Xemu? I've been using Game Extractor to replace the .wav files, but they come out screechy, I've also used Xbox ADPCM Converter however, that makes the songs in game play too fast. Any ideas would be helpful!

Or if not this software, where would I be able to find a way to do this!?

Kind Regards G

JayFoxRox commented 2 months ago

I haven't looked at ADPCM in a couple of years, so take this with a grain of salt.


I'm trying to convert my wav files to use to replace them in a .xwb for an original xbox game

The decoder here is accepting raw ADPCM blocks as input because it was used to prototype the conversion for Xbox emulation; so you can go from ADPCM to PCM.

No idea about xwb (which is probably a file format). There isn't a ADPCM encoder here either (if I remember correctly); so you can not go from PCM to ADPCM.

convert my standard .wav files to a format that will play well in Xemu

Xemu is an Xbox emulator, I'm not aware of it having an ADPCM player (although I haven't really used Xemu yet). So eitherway, you'd need an Xbox application to load the ADPCM buffer into the APU for playback.

using Game Extractor to replace the .wav files, but they come out screechy

I'm not familiar with that tool. However, it sounds like you might be using incorrect channel counts, frequencies or sampling formats.

I've also used Xbox ADPCM Converter however, that makes the songs in game play too fast

That's probably a frequency issue. Ensure your WAV file matches the expected frequency of the ADPCM (likely 48.000Hz, potentially less). If the tool can't handle your required frequency you should ask them to support it.

Or if not this software, where would I be able to find a way to do this!?

Looks like you already have found a tool (namely, the one you linked)? I'm not sure about it, but I'd also expect there to be support in ffmpeg or audacity.

The ADPCM blocks are pretty much IMA ADPCM, so there are probably other encoders. See https://xboxdevwiki.net/Xbox_ADPCM


Closing this issue as the original question has been answered. Feel free to add follow-up questions in this closed issue if necessary.