Simplify WVE block parsing by ignoring empty blocks

This commit is contained in:
bnnm 2018-04-13 16:46:24 +02:00
parent 0482a120bc
commit 887ceec4cd
2 changed files with 8 additions and 6 deletions

View File

@ -6,10 +6,11 @@
void block_update_ea_wve_ad10(off_t block_offset, VGMSTREAM * vgmstream) {
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
int i;
size_t channel_size = 0, interleave = 0;
uint32_t block_id = read_32bitBE(block_offset+0x00, streamFile);
size_t block_size = read_32bitBE(block_offset+0x04, streamFile);
size_t block_size, channel_size = 0, interleave = 0;
uint32_t block_id;
block_id = read_32bitBE(block_offset+0x00, streamFile);
block_size = read_32bitBE(block_offset+0x04, streamFile);
/* accept "Ad10/Ad11" audio block/footer */
if (block_id == 0x41643130 || block_id == 0x41643131) {

View File

@ -6,10 +6,11 @@
void block_update_ea_wve_au00(off_t block_offset, VGMSTREAM * vgmstream) {
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
int i;
size_t channel_size = 0;
uint32_t block_id = read_32bitBE(block_offset+0x00, streamFile);
size_t block_size = read_32bitBE(block_offset+0x04, streamFile);
size_t block_size, channel_size = 0;
uint32_t block_id;
block_id = read_32bitBE(block_offset+0x00, streamFile);
block_size = read_32bitBE(block_offset+0x04, streamFile);
/* accept "au00/au01" audio block/footer */
if (block_id == 0x61753030 || block_id == 0x61753031) {