Dolphin, the GameCube and Wii emulator - Forums

Full Version: [PATCH] Audio dumping
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
This diff against r7058 places a checkbox in the config to enable the previously dormant audio dumping code, with a couple of adjustments to get it to dump audio more or less correctly (there's a .3125 second, i.e. 10000 sample at 32KHz, lag between audio and video which I haven't been able to isolate yet, but one can work around this).

I intend for this to assist in getting high quality multimedia dumps for later high quality encoding - assuming you're using a lossless video codec you can now capture all of the audio and video data from a session. hopefully this will eventually take the form of being able to dump one all-in-one stream as opposed to doing the audio and video dumping separately.

EDIT: Adjusted slightly from initial post to use the configuration sample rate in the case that you're using HLE audio. LLE samples always seem to reach the output at 32KHz, so if you're wondering why that's there, that's why.

EDIT: Here's a new version of the patch against r7093 to account for the minor change to AudioCommon.cpp in r7082. Nothing else has changed.
Nice work, but why 32khz? Also, now that plugins have been merged we should look into how to incorporate audio dumping into the AVI creation.
I adjusted the patch to pull the sample rate from the configuration (in most cases; LLE always seems to output at 32KHz).
Where do the dumped files end up? I can't figure out where the output of the function is. (Got it to build just fine, the checkbox in the Audio tab is there and checkable, but I can't find the dump.)
Look in User/Dump/Audio.
I know I already asked, but How I can add a patch?

I must know step by step, I didn't could find any tutorial Sad

I'm a audio and sprite ripper from a pretty long time, and I would like to use that...

Sgrunt, could you help me?
I will get the revision soon
I moved your dump code from the backends into the mixer which should make it work across all backends. Also added logic so HLE audio renders at 30fps when capturing to prevent recorded samples getting chopped off if fps drops below 30.

I think the delay you are referring to is the 8k buffer in the mixer that lle/dma audio passes through. With the code in the mixer it would be possible to get around that latency if you really wanted to.
I discovered with Panic Alerts that it wasn't opening the file, so I created the Audio directory. Now, no matter what combination of settings I try, I end up with an unplayable .wav file that is 44 bytes long. With the IL recompliler I get a slew of write offsets right at the beginning, but both compilers cause empty dumps. I've not found a configuration of DSP settings or otherwise that causes it to produce a dump.

It seems like it's almost working, and I may just be missing something obvious somewhere.
The 7093 version of the patch I think only works with linux audio backends but the mixer version I posted above should work for you.
more sound work, yay!
Pages: 1 2 3