Dolphin, the GameCube and Wii emulator - Forums

Full Version: SFX ripping/decoding/dumping features?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(03-15-2015, 04:17 AM)jimbo1qaz Wrote: [ -> ]EDIT: The data file is part of the game disk. The file in my Dropbox folder is an audio log file used for reverse-engineering, not the actual data file.

The decompression coefficients are loaded from the data file at 302C[0:32].
The actual data is located at 26bc8.
ADPCM requires the "history", the prior 2 samples. Both are 0x0013.
The input begins with coeff 0, and data 0.
That results in a continued stream of 0x0013 output.


Quote:    # IMPORTANT DATA STARTS HERE
   
   # The following data describes the rising siren-like sound effect.
   # I have located the data required to decode it.

   # coeffs[16], prev out, prev out 2, which coeff, memory location, memory value
   # (3618, -1577, 84, 1943, 0, 0, 0, 0, 0, 0, 1771, 245, 0, 0, 0, 0), 19, 19, 0, 161826, 0
   
   # Samples are loaded from 26bc8
   # Coefficients are loaded from 302C[0:32]
   # History 0x0013 not sure where.
   # Prev xy = 0
   # Scale 0, coeffs 0
   # ((0x400 + itertools.product(prev, factors)) >> 11) + (raw_value << exp)

I can't believe I never asked this, but what the heck is the sample rate of this sound?

Qaazavaca Qaanic

sampling rate is usually 32000. there is the slight chance that they are using lower-rate audio for saving space.
I think it's raw packed gc-hardware-adpcm format. Not dtk-adpcm. (Both are hardware-accelerated.)
I don't know how the compression coefficients and starting values are stored, but I made a custom build of Dolphin a while ago that would dump that stuff in a more-or-less unusable format. You can't tell which sound effect uses which coefficients, etc.
(06-13-2015, 08:55 AM)jimbo1qaz Wrote: [ -> ]sampling rate is usually 32000. there is the slight chance that they are using lower-rate audio for saving space.
I think it's raw packed gc-hardware-adpcm format. Not dtk-adpcm. (Both are hardware-accelerated.)
I don't know how the compression coefficients and starting values are stored, but I made a custom build of Dolphin a while ago that would dump that stuff in a more-or-less unusable format. You can't tell which sound effect uses which coefficients, etc.

Okay...

Hey, what do you know about hex editors?
(06-13-2015, 08:55 AM)jimbo1qaz Wrote: [ -> ]sampling rate is usually 32000. there is the slight chance that they are using lower-rate audio for saving space.
I think it's raw packed gc-hardware-adpcm format. Not dtk-adpcm. (Both are hardware-accelerated.)
I don't know how the compression coefficients and starting values are stored, but I made a custom build of Dolphin a while ago that would dump that stuff in a more-or-less unusable format. You can't tell which sound effect uses which coefficients, etc.

But, what good does it do if it's an unusable format? Is there any way that a dumb@$$ like me could go about ripping the sounds
without having to learn to write in complex code or do feats of programming grandeur?

I've been wasting so much time on this... it's time I got it done already.
Games use their own formats, so it's not something you can just do globally. You need per-game solutions depending upon which formats each game uses.
I would try the ADX solution first. I hope it works.
(06-13-2015, 10:10 AM)ARAJediMaster Wrote: [ -> ]I would try the ADX solution first. I hope it works.

Renaming the file to .ADX does not, did not and will not work. It doesn't change the actual format of the data, only the extension.
(06-13-2015, 09:56 AM)Aleron Ives Wrote: [ -> ]Games use their own formats, so it's not something you can just do globally. You need per-game solutions depending upon which formats each game uses.

Looks like the .ADX format didn’t work well for iteachvader. I hope he can work around that problem fine anyway.
I don’t know jack about hex editors, but does anybody else here do? Like what they are supposed to do and how to use them? I have a Wikipedia page here: https://en.wikipedia.org/wiki/Hex_editor, but I don’t anything else beyond that.
They allow you to view the raw contents of files without trying to interpret said contents, which is necessary if you want to examine a file but don't have a specific program designed to manipulate that file type. I'm partial to WinHex, but there are hundreds of different hex editors each with their own features.

If you want to decode ADX to WAV, you need an ADX decoder. Tongue If the game has the CRI logo somewhere in it, then it has ADX audio. MPEG Sofdec (*.sfd) is just MPEG-1 video with ADX audio in place of the usual MP3 audio that a *.mpg file would usually have. ADX is common for BGM, but I haven't seen it used for sound effects.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15