To go with my Psychonauts Audio Ripper (
http://www.lucasforums.com/showthread.php?s=&threadid=147797) here are the specs and ripping instructions for the various audio files.
Pc Version: .isb files:
-----------------------
The .isb files contain the audio data.
Structure of file:
------------------
4 bytes: Header 'RIFF'
4 bytes: File Size (-8)
8 bytes: 'isbftitl'
4 bytes: Size of Text Block
X bytes: Text Block
Repeated throughout file for each entry:
*****
4 bytes: Block Name
4 bytes: Block Size (not including 8 bytes for block name and size)
X Bytes: Block Data
*****
Some of these blocks are special:
LIST BLOCK:
4 bytes: 'LIST'
4 bytes: Block Size (including all sub-blocks)
8 bytes: Dummy title? Usually 'samptitl'
4 bytes: Size of filename
X Bytes: Filename (each letter is seperated by a 0 byte)
The filename sometimes has the incorrect file extension so
you'll want to remote this and replace it with the correct one.
However sometimes the file extension has '-loop' tagged on the end
eg 'AsylumExt.aif-Loop' - if you remove the file extension then this
file would become 'AsylumExt' - but there is already a file with this
name so you'd need to add 'loop' back to the filename somehow to make
it a unique name eg 'AsylumExt-Loop'.
SINF BLOCK:
4 bytes: 'SINF'
4 bytes: Block Size
8 bytes: ?
4 bytes: Samplerate
8 bytes: ?
CHNK BLOCK:
4 bytes: 'CHNK'
4 bytes: Block Size
4 bytes: Number of Channels
CMPI BLOCK:
4 bytes: 'CMPI'
4 bytes: Block Size
20 bytes: ?
4 bytes: if = 1053609165 then its a normal pcm wav otherwise
its xbox adpcm.
DATA BLOCK:
4 bytes: 'DATA'
4 bytes: Block Size
Blocksize sometimes has 1 byte padding so:
if blocksize mod 2 <> 0 then blocksize:=blocksize + 1
X bytes: Rest of block is the file data.
Dump the file data then continue on to next LIST block.
Repeat until you reach end of file.
Any other block:
Just skip the block. Read the block name and block size then seek
'blocksize' bytes.
Dumping Files:
--------------
If first 4 bytes of file data='OggS' then its an ogg file.
Otherwise its always an xbox or normal pcm wave.
If its an ogg file then just copy out 'blocksize' bytes.
If its a wav file though you need to write the .wav header first:
You need to write the following:
4 bytes: 'RIFF' (1179011410)
4 bytes: Blocksize + 40
4 bytes: 'WAVE' (1163280727)
4 bytes: 'fmt ' (544501094)
4 bytes: Size of fmt block (20)
2 bytes: PCM Code:
if its normal pcm then = 1
if its xbox adpcm then = 105
2 bytes: Number of channels
4 bytes: Samplerate
4 bytes: Byterate:
if its normal pcm then = (SampleRate * No Channels * 16) div 8
if its xbox adpcm then = No Channels * 24806;
2 bytes: Block align
if its normal pcm then = (No Channels * 16) div 8
if its xbox adpcm then = No Channels * 36
2 bytes: Bits per sample
if its normal pcm then = 16
if its xbox adpcm then = 4
4 bytes: Extra data
if its normal pcm then = 16
if its xbox adpcm then = 4194306
4 bytes: 'DATA' (1635017060)
4 bytes: Size of data block (blocksize bytes)
Extra Checks:
Sometimes the Number of Channels=0 so change this to 1
(I think its always 1)