2008-08-11 09:19:44 +02:00
|
|
|
#include "layout.h"
|
|
|
|
|
2017-11-23 22:36:49 +01:00
|
|
|
/* Falcom RIFF blocks (.DEC/DE2) */
|
2008-08-11 09:19:44 +02:00
|
|
|
void de2_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
2017-11-23 22:36:49 +01:00
|
|
|
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
|
|
|
size_t block_size, header_size;
|
2008-08-11 09:19:44 +02:00
|
|
|
int i;
|
2017-11-23 22:36:49 +01:00
|
|
|
|
|
|
|
header_size = 0x08;
|
|
|
|
block_size = read_32bitLE(block_offset,streamFile);
|
|
|
|
/* 0x04: PCM size? */
|
|
|
|
|
2008-08-11 09:19:44 +02:00
|
|
|
vgmstream->current_block_offset = block_offset;
|
2017-11-23 22:36:49 +01:00
|
|
|
vgmstream->current_block_size = block_size;
|
|
|
|
vgmstream->next_block_offset = block_offset + block_size + header_size;
|
2008-08-11 09:19:44 +02:00
|
|
|
|
2017-11-23 22:36:49 +01:00
|
|
|
/* MSADPCM = same offset per channel */
|
|
|
|
for (i = 0; i < vgmstream->channels; i++) {
|
|
|
|
vgmstream->ch[i].offset = vgmstream->current_block_offset + header_size;
|
2008-08-11 09:19:44 +02:00
|
|
|
}
|
|
|
|
}
|