Fixed a warning

This commit is contained in:
NicknineTheEagle 2022-09-03 22:30:45 +03:00
parent c62a0f8bb4
commit 585dd9a5bb

View File

@ -251,7 +251,7 @@ VGMSTREAM* init_vgmstream_wbk_nslb(STREAMFILE* sf) {
case 0x22: { /* DSP */
int i, j;
off_t table_offset;
off_t coef_table_offset;
vgmstream->coding_type = coding_NGC_DSP;
vgmstream->layout_type = layout_interleave;
@ -259,14 +259,14 @@ VGMSTREAM* init_vgmstream_wbk_nslb(STREAMFILE* sf) {
/* check info entry variation */
if (read_u32le(info_entry_offset + 0x44 + 0x30*channels, sf) != 0x00)
table_offset = 0x4c; /* Call of Duty 3 */
coef_table_offset = 0x4c; /* Call of Duty 3 */
else
table_offset = 0x44; /* Kung Fu Panda */
coef_table_offset = 0x44; /* Kung Fu Panda */
/* It looks like the table is re-interpreted as 8 32-bit integers and stored with little endian byte order
* like the rest of the data. Fun times. */
for (i = 0; i < vgmstream->channels; i++) {
off_t coef_offset = info_entry_offset + table_offset + 0x30*i;
off_t coef_offset = info_entry_offset + coef_table_offset + 0x30*i;
for (j = 0; j < 8; j++) {
vgmstream->ch[i].adpcm_coef[j*2] = read_s16le(coef_offset + j*0x04 + 0x02, sf);
vgmstream->ch[i].adpcm_coef[j*2+1] = read_s16le(coef_offset + j*0x04 + 0x00, sf);