Dr. Cheap's House of Hacks

ObWavHack

Circa 1997

If you are l337 enough to read alt.hacker then you know about the Obligitory Hack. Here's one I used on the end of a message I posted some time in 1997.

ObWavHack:

Okie...This one I'm quite proud of, so it's long!

The problem?  I have this 77MB .WAV file that went corrupt somwhere
about 5 or 10 sectors before the end .  What happens when I try
to load it up in my favorite sound editor?  *GPF*  grr..winblows :P
Luckily I had a made a backup copy of it before doing some work on it,
so it wasn't a total loss.  Well, except the 5 hours of work to cue it
into 13 different parts, and making a spreadsheet of which parts could
be appended to which other parts (13*13=169 test runs).  All I really
needed to recover was the footer info, which contained the cue listing.

Deciding that it would be to much work to redo all this (and it would
not be identical either), I head to some reference material on RIFF
file structure...cryptic (for me) to say the least.  So I decide to
make my own crash course (no pun intended) in WAV header/footer
structure.  Okay, an hour or so goes by and it's time to tackle the
big boy.  I come up with an idea, and it went something like this:

Take the size of corrupt file's footer, subtract the size of the
original's footer and get a number.  Make a junk text file of that
number of bytes (+/- a few--don't ask why).  Pull a simple DOS
command TYPE JUNK.TXT >> GOOD.WAV and now you have a good .WAV
with a corrupt footer :)  But the length is right!  Next, go into
Disk Editor and copy the good footer from CORRUPT.WAV over the
crap footer of GOOD.WAV and save the changes.

Ok...this seemed pretty logical, so I did it and loaded it into
the sound editor.  The suspense killed me as it took 5 mins to
load :)  Then...it appeared in front of me!  The cue list was
NOT EMPTY!!!  It had the beginning of each section marked!  All
I had to do was match each beginning to the next, and boom!

T H E  E N D
 

Return to the House of Hacks Index