Remove thpNextFrameSize and use full_block_size instead

This commit is contained in:
bnnm 2017-12-08 01:20:09 +01:00
parent d0c44be330
commit b5da881a44
3 changed files with 4 additions and 6 deletions

View File

@ -12,8 +12,8 @@ void thp_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
nextFrameSize=read_32bitBE(vgmstream->current_block_offset,streamFile);
vgmstream->next_block_offset = vgmstream->current_block_offset
+ vgmstream->thpNextFrameSize;
vgmstream->thpNextFrameSize=nextFrameSize;
+ vgmstream->full_block_size;
vgmstream->full_block_size = nextFrameSize;
start_offset=vgmstream->current_block_offset
+ read_32bitBE(vgmstream->current_block_offset+0x08,streamFile)+0x10;

View File

@ -87,7 +87,7 @@ VGMSTREAM * init_vgmstream_thp(STREAMFILE *streamFile) {
}
}
vgmstream->thpNextFrameSize=read_32bitBE(0x18,streamFile);
vgmstream->full_block_size = read_32bitBE(0x18,streamFile); /* block size of current block, changes every time */
thp_block_update(start_offset,vgmstream);
vgmstream->coding_type = coding_NGC_DSP;

View File

@ -732,7 +732,6 @@ typedef struct {
/* layouts/block */
size_t interleave_block_size; /* interleave, or block/frame size (depending on the codec) */
size_t interleave_smallblock_size; /* smaller interleave for last block */
size_t full_block_size; /* fixed data size, from header (may include padding and other unusable data) */
/* channel state */
VGMSTREAMCHANNEL * ch; /* pointer to array of channels */
@ -740,6 +739,7 @@ typedef struct {
VGMSTREAMCHANNEL * loop_ch; /* copies of channel status as they were at the loop point */
/* layout/block state */
size_t full_block_size; /* actual data size of an entire block (ie. may be fixed, include padding/headers, etc) */
int32_t current_sample; /* number of samples we've passed */
int32_t samples_into_block; /* number of samples into the current block */
off_t current_block_offset; /* start of this block (offset of block header) */
@ -771,8 +771,6 @@ typedef struct {
int32_t ws_output_size; /* WS ADPCM: output bytes for this block */
int32_t thpNextFrameSize; /* THP */
void * start_vgmstream; /* a copy of the VGMSTREAM as it was at the beginning of the stream (for AAX/AIX/SCD) */
/* Data the codec needs for the whole stream. This is for codecs too