Daxim on 22/6/2002 at 10:29
Code:
#hash bang slash usr slash bin slash perl? not on winderz.
open (PAK, "<@ARGV");
@stats=stat(PAK);
binmode(PAK);
print "Reading PAK\n";
read (PAK, $buf, $stats[7]);
close (PAK);
print length($buf)." bytes in buffer\n";
@wavs=split(/RIFF/, $buf);
print "$#wavs wavs splitted\n";
print "Dumping files";
foreach (@wavs) {
printf " %4d",$i;
open (WAVOUT, ">$i.wav");
binmode(WAVOUT);
print WAVOUT "RIFF", $_;
close (WAVOUT);
$i++;
};
usage: perl wavrip.pl speech.pak
(or whatever file you want to rip from)
Tels on 22/6/2002 at 10:48
Woha, now I can build an un-official English version...:)
It works, but it has some bugs (creates a ".wav" file, for instance).
Cheers,
Tels
PS: I can not believe, that the didn't even compress the stuff :(
Tels on 22/6/2002 at 10:52
Oh my, there are an LOT of wav files, and quite a lot aren't used in the demo. Hm, couldn't Arkane have cut out some of them to make the download smaller?
Cheers,
Tels
Raf on 22/6/2002 at 11:10
compressing adpcm is useless...
Tels on 22/6/2002 at 11:23
Quote:
compressing adpcm is useless...
Duh! I assumed you had uncompressed ;) Would be .ogg files be smaller?
[Which shows I should think before post..bad boy.....bad Tels...]
Daxim on 22/6/2002 at 11:36
Quote:
Originally posted by Raf compressing adpcm is useless... Not quite:
<tt>
Sat 22.06.02 13:23 c:\spiele\arxdemo>dir s*.pak
Volume in drive C is SEAGATE Serial number is 3CE7:BF13
Directory of C:\Spiele\Arxdemo\s*.pak
6.06.02 11:32 31.995.270 SFX.pak
6.06.02 11:31 41.487.810 SPEECH.pak
73.483.080 bytes in 2 files and 0 dirs 73.498.624 bytes allocated
10.033.790.976 bytes free
Sat 22.06.02 13:23 c:\spiele\arxdemo>minizip SFX.zip SFX.pak ^ minizip SPEECH.zip SPEECH.pak
creating SFX.zip
creating SPEECH.zip
Sat 22.06.02 13:26 c:\spiele\arxdemo>dir *.zip
Volume in drive C is SEAGATE Serial number is 3CE7:BF13
Directory of C:\Spiele\Arxdemo\*.zip
22.06.02 13:25 24.004.836 SFX.zip
22.06.02 13:26 31.880.546 SPEECH.zip
55.885.382 bytes in 2 files and 0 dirs 55.902.208 bytes allocated
9.982.083.072 bytes free
Sat 22.06.02 13:26 c:\spiele\arxdemo>
</tt>
ADPCM compression ratio sucks, but at least it decompresses quickly and is not CPU intensive. However I agree with Tels, CPU time was hardly an argument back when the Dark engine games (Thief, Shock2) came out (ADPCM compression, too) - about the same time Daikatana showed that MP3 worked fine without affecting the game negatively.
Since Arx plays the audio through the MSACM, it actually shouldn't care whether the RIFFs contain WAV-PCM or a foreign format, as long the codec is installed. I'll go now and experiment with the Lame ACM and (
http://hp.vector.co.jp/authors/VA012897/) Vorbis ACM codecs. Let's see how much further the resource files can be shrunken... ;)
Tels on 22/6/2002 at 13:22
Quote:
Since Arx plays the audio through the MSACM, it actually shouldn't care whether the RIFFs contain WAV-PCM or a foreign format, as long the codec is installed. I'll go now and experiment with the Lame ACM and Vorbis ACM codecs. Let's see how much further the resource files can be shrunken...
LOL, nice idea :-)
(Sorry about me thinking the WAVs are uncompressed...)
Daxim on 22/6/2002 at 13:41
Result of my experiments: doesn't work like expected. RIFFs must contain wav data.