View Single Post
Old 01-11-2004, 06:52 AM   #10
Moosferatu
Senior Member
 
Moosferatu's Avatar
 
Join Date: Sep 2003
Location: Grand Rapids, Michigan
Posts: 578
Default

I think that most of it is trash, but what you want is the extractor made by one of the guys there. You can find it here. I haven't looked at it myself but he made a GUI for it so it should be pretty self explanitory.

Quote:
Updated the extractor program,

for the -a and the -x options you can append -wavpcm



bfextract -x sally_clean.bf "01-Boss After Mili.wam" -wavpcm


That should extract the file + ".pcm.wav" added to the file name. It took me awhile to write this code only cuz i've not had to work with raw audio before.

if you want a listing of the files in the bf

bfextract -l sally_clean.bf

or if you wanna put it into a text file for easy viewing

bfextract -l sally_clean.bf > textfile.txt


I have already tested the files I output with LAME(mp3encoder) and it works great


ADPCM -> PCM WAV = about a 20-30% increase in size but
PCM WAV -> MP3 = about a 50% decrease in size (128-160)

so the files actually get SMALLER than the original files

You should be able to use ANY WAV file player to play these files, and any WAV->MP3 encoder (use your fav.)
Quote:
VERY nice! Great little utility you've come up with. I was able to extract the music files to PCM wav and convert them to mp3 no problem. Thanks a lot, you've done the BGE community a great service.

For anyone looking for a nice free wav->mp3 converter check out CDex, a freeware/opensource CD-Ripper/wav->mp3 & vice versa converter:

http://www.cdex.n3.net/
Quote:
Make sure you add a trailing "-wavpcm" argument to the command when you run bfextractor. That'll convert them to standard WAV files (search the thread for the gory details) that you can read with WinAMP or any other media player. If you don't do that, or you can't get it working for some reason, only VLC at www.videolan.org will play them. RTFT.
Quote:
One thing you can do is first separate the WAM and the WAA files. To do this you'll want to make a list.

bfextractor -l sally_clean.bf *.wam > wamfiles.txt

bfextractor -l sally_clean.bf *.waa > waafiles.txt

Now you have two text files will all of the audio files.

Next you can make a batch file that automatically extracts the files listed and converts them to a RAW PCM file. I made one called expandwam.bat

for /F "eol= tokens=*" %%S in (wamfiles.txt) do (do bfextractor -x sally_clean.bf "%%S" -wavpcm)

You can make a similar one for waafiles.txt.

Run the batch file and it will extract all of the files in your list and convert them into wav files so you can edit or listen to them.

Not all of the files are the same bit rating or sampling size so you may need to edit them in some audio program.
I don't know what the GUI looks like it might take care of some of the more complicated stuff for you. I wish I could help more but since I don't have the PC edition, I can't. Maybe some else, like Erkki, could help.
Moosferatu is offline