2010-12-29 13:33:33 +01:00
|
|
|
#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-12-22 20:09:01 +01:00
|
|
|
void block_update_vs_str(off_t block_offset, VGMSTREAM * vgmstream) {
|
2018-06-30 16:01:29 +02:00
|
|
|
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
2010-12-29 13:33:33 +01:00
|
|
|
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) */
|
2010-12-29 13:33:33 +01:00
|
|
|
|
2018-06-30 16:01:29 +02:00
|
|
|
for (i = 0; i < vgmstream->channels; i++) {
|
|
|
|
vgmstream->ch[i].offset = block_offset + 0x20 + 0x800*i;
|
2010-12-29 13:33:33 +01:00
|
|
|
}
|
|
|
|
}
|