vgmstream/src/layout/blocked_ps2_strlr.c

18 lines
704 B
C
Raw Normal View History

#include "layout.h"
#include "../vgmstream.h"
2018-06-30 16:01:29 +02:00
/* The Bouncer STRx blocks, one block per channel when stereo */
2018-03-29 19:00:04 +02:00
void block_update_ps2_strlr(off_t block_offset, VGMSTREAM * vgmstream) {
2018-06-30 16:01:29 +02:00
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
int i;
2018-06-30 16:01:29 +02:00
vgmstream->current_block_offset = block_offset;
vgmstream->current_block_size = read_32bitLE(block_offset+0x04,streamFile); /* can be smaller than 0x800 */
vgmstream->next_block_offset = block_offset + 0x800*vgmstream->channels;
/* 0x08: number of remaning blocks, 0x10: some id/size? (shared in all blocks) */
2018-06-30 16:01:29 +02:00
for (i = 0; i < vgmstream->channels; i++) {
vgmstream->ch[i].offset = block_offset + 0x20 + 0x800*i;
}
}