@@ -221,7 +221,7 @@ VGMSTREAM* init_vgmstream_fsb(STREAMFILE* sf) {
221221 }
222222 else {
223223 /* subsong header for normal files */
224- stream_header_size = ( uint16_t ) read_16bitLE (header_offset + 0x00 ,sf );
224+ stream_header_size = read_u16le (header_offset + 0x00 ,sf );
225225 fsb .name_offset = header_offset + 0x02 ;
226226 fsb .name_size = 0x20 - 0x02 ;
227227 fsb .num_samples = read_32bitLE (header_offset + 0x20 ,sf );
@@ -231,7 +231,7 @@ VGMSTREAM* init_vgmstream_fsb(STREAMFILE* sf) {
231231 fsb .mode = read_32bitLE (header_offset + 0x30 ,sf );
232232 fsb .sample_rate = read_32bitLE (header_offset + 0x34 ,sf );
233233 /* 0x38: defvol, 0x3a: defpan, 0x3c: defpri */
234- fsb .channels = read_16bitLE (header_offset + 0x3e ,sf );
234+ fsb .channels = read_u16le (header_offset + 0x3e ,sf );
235235 /* FSB3.1/4:
236236 * 0x40: mindistance, 0x44: maxdistance, 0x48: varfreq/size_32bits
237237 * 0x4c: varvol, 0x4e: fsb.varpan */
@@ -287,9 +287,9 @@ VGMSTREAM* init_vgmstream_fsb(STREAMFILE* sf) {
287287 //;VGM_ASSERT(fsb.flags & FMOD_FSB_SOURCE_ENCRYPTED, "FSB ENCRYPTED found\n");
288288
289289 /* sometimes there is garbage at the end or missing bytes due to improper ripping */
290- VGM_ASSERT (fsb .base_header_size + fsb .sample_headers_size + fsb .sample_data_size != sf -> get_size (sf ),
290+ vgm_asserti (fsb .base_header_size + fsb .sample_headers_size + fsb .sample_data_size != get_streamfile_size (sf ),
291291 "FSB wrong head/data_size found (expected 0x%x vs 0x%x)\n" ,
292- fsb .base_header_size + fsb .sample_headers_size + fsb .sample_data_size , sf -> get_size (sf ));
292+ fsb .base_header_size + fsb .sample_headers_size + fsb .sample_data_size , get_streamfile_size (sf ));
293293
294294 /* autodetect unwanted loops */
295295 {
@@ -319,7 +319,7 @@ VGMSTREAM* init_vgmstream_fsb(STREAMFILE* sf) {
319319
320320 fsb .loop_flag = !(fsb .mode & FSOUND_LOOP_OFF ); /* disabled manually */
321321 if (fsb .loop_flag && !enable_loop && full_loop && is_small ) {
322- VGM_LOG ("FSB: disable unwanted loop\n" );
322+ VGM_LOG ("FSB: disabled unwanted loop\n" );
323323 fsb .loop_flag = 0 ;
324324 }
325325 }
@@ -426,8 +426,8 @@ VGMSTREAM* init_vgmstream_fsb(STREAMFILE* sf) {
426426 /* get libcelt version (set in the first subsong only, but try all extradata just in case) */
427427 if (fsb .first_extradata_offset || fsb .extradata_offset ) {
428428 uint32_t lib = fsb .first_extradata_offset ?
429- ( uint32_t ) read_32bitLE (fsb .first_extradata_offset , sf ) :
430- ( uint32_t ) read_32bitLE ( fsb .extradata_offset , sf ); ;
429+ read_u32le (fsb .first_extradata_offset , sf ) :
430+ read_u32le ( fsb .extradata_offset , sf );
431431 switch (lib ) {
432432 case 0x80000009 : is_new_lib = 0 ; break ; /* War Thunder (PC) */
433433 case 0x80000010 : is_new_lib = 1 ; break ; /* Vessel (PC) */
@@ -436,7 +436,7 @@ VGMSTREAM* init_vgmstream_fsb(STREAMFILE* sf) {
436436 }
437437 else {
438438 /* split FSBs? try to guess from observed bitstreams */
439- uint16_t frame = ( uint16_t ) read_16bitBE (fsb .stream_offset + 0x04 + 0x04 ,sf );
439+ uint16_t frame = read_u16be (fsb .stream_offset + 0x04 + 0x04 ,sf );
440440 if ((frame & 0xF000 ) == 0x6000 || frame == 0xFFFE ) {
441441 is_new_lib = 1 ;
442442 } else {
0 commit comments