This commit is contained in:
bnnm 2021-08-22 13:15:06 +02:00
parent 2eb4f91075
commit 2489d1e17b
4 changed files with 14 additions and 14 deletions

View File

@ -58,7 +58,7 @@ export RMF SHELL CC AR STRIP WINDRES DLLTOOL
############################################################################### ###############################################################################
### build defs ### build defs
DEF_CFLAGS += -ffast-math -O3 -Wall -Werror=format-security -Wlogical-op -Wdeclaration-after-statement -Wvla -Wimplicit-function-declaration -Wignored-qualifiers DEF_CFLAGS += -ffast-math -O3 -Wall -Werror=format-security -Wdeclaration-after-statement -Wvla -Wimplicit-function-declaration -Wignored-qualifiers
VGM_DEBUG_FLAGS = 0 VGM_DEBUG_FLAGS = 0
ifeq ($(VGM_DEBUG_FLAGS),1) ifeq ($(VGM_DEBUG_FLAGS),1)
@ -67,6 +67,7 @@ ifeq ($(VGM_DEBUG_FLAGS),1)
DEF_CFLAGS += -Wall DEF_CFLAGS += -Wall
DEF_CFLAGS += -Wextra DEF_CFLAGS += -Wextra
DEF_CFLAGS += -Wno-sign-compare DEF_CFLAGS += -Wno-sign-compare
DEF_CFLAGS += -Wlogical-op
#DEF_CFLAGS += -pedantic -Wconversion -std=gnu90 #DEF_CFLAGS += -pedantic -Wconversion -std=gnu90
#DEF_CFLAGS += -Wfloat-equal #DEF_CFLAGS += -Wfloat-equal
DEF_CFLAGS += -Wdisabled-optimization -Wunsafe-loop-optimizations -Wswitch-default DEF_CFLAGS += -Wdisabled-optimization -Wunsafe-loop-optimizations -Wswitch-default
@ -77,6 +78,7 @@ ifeq ($(VGM_DEBUG_FLAGS),1)
DEF_CFLAGS += -Wredundant-decls -Wmissing-include-dirs -Wmissing-declarations DEF_CFLAGS += -Wredundant-decls -Wmissing-include-dirs -Wmissing-declarations
#DEF_CFLAGS += -Wshadow #DEF_CFLAGS += -Wshadow
#DEF_CFLAGS += -Wstack-protector -fstack-protector #DEF_CFLAGS += -Wstack-protector -fstack-protector
STRIP = echo
endif endif
LIBS_CFLAGS= LIBS_CFLAGS=

View File

@ -150,7 +150,7 @@ Since XMPlay supports Winamp plugins you may also use `in_vgmstream.dll` instead
Because the XMPlay MP3 decoder incorrectly tries to play some vgmstream extensions, Because the XMPlay MP3 decoder incorrectly tries to play some vgmstream extensions,
you need to manually fix it by going to **options > plugins > input > vgmstream** you need to manually fix it by going to **options > plugins > input > vgmstream**
and in the "priority filetypes" put: `ahx,asf,awc,ckd,fsb,genh,msf,p3d,rak,scd,txth,xvag` and in the "priority filetypes" put: `ahx,asf,awc,ckd,fsb,genh,lwav,msf,p3d,rak,scd,txth,xvag`
XMPlay cannot support subsongs due to player limitations (with any plugin), try XMPlay cannot support subsongs due to player limitations (with any plugin), try
using *TXTP* instead (explained below). using *TXTP* instead (explained below).

View File

@ -238,9 +238,9 @@ static void init_dequantization(float* scales) {
static int unpack_frame(uint8_t* buf, int buf_size, float* freq1, float* freq2, const float* scales, uint8_t* exponents, int freq_size) { static int unpack_frame(uint8_t* buf, int buf_size, float* freq1, float* freq2, const float* scales, uint8_t* exponents, int freq_size) {
uint8_t flags, cb_bits, ev_bits, ei_bits, qv_bits; uint8_t flags, cb_bits, ev_bits, ei_bits, qv_bits;
int qv; int qv, pos;
uint8_t ev; uint8_t ev;
uint8_t move, pos; uint8_t move;
uint32_t bit_offset, max_offset; uint32_t bit_offset, max_offset;
int i, j; int i, j;
int freq_half = freq_size >> 1; int freq_half = freq_size >> 1;

View File

@ -28,9 +28,9 @@ VGMSTREAM* init_vgmstream_cpk_memory(STREAMFILE* sf, STREAMFILE* sf_acb) {
/* checks */ /* checks */
if (!check_extensions(sf, "awb")) if (!check_extensions(sf, "awb"))
goto fail; goto fail;
if (read_u32be(0x00,sf) != 0x43504B20) /* "CPK " */ if (!is_id32be(0x00,sf, "CPK "))
goto fail; goto fail;
if (read_u32be(0x10,sf) != 0x40555446) /* "@UTF" */ if (!is_id32be(0x10,sf, "@UTF"))
goto fail; goto fail;
/* 04: 0xFF? */ /* 04: 0xFF? */
/* 08: 0x02A0? */ /* 08: 0x02A0? */
@ -176,23 +176,21 @@ VGMSTREAM* init_vgmstream_cpk_memory(STREAMFILE* sf, STREAMFILE* sf_acb) {
//;VGM_LOG("CPK: subfile offset=%lx + %x, id=%i\n", subfile_offset, subfile_size, subfile_id); //;VGM_LOG("CPK: subfile offset=%lx + %x, id=%i\n", subfile_offset, subfile_size, subfile_id);
if ((read_u32be(subfile_offset,sf) & 0x7f7f7f7f) == 0x48434100) { /* "HCA\0" */ if ((read_u32be(subfile_offset,sf) & 0x7f7f7f7f) == get_id32be("HCA\0")) {
type = HCA; type = HCA;
extension = "hca"; extension = "hca";
} }
else if (read_u32be(subfile_offset,sf) == 0x43574156) { /* "CWAV" */ else if (is_id32be(subfile_offset,sf, "CWAV")) {
type = CWAV; type = CWAV;
extension = "bcwav"; extension = "bcwav";
} }
else if (read_u16be(subfile_offset, sf) == 0x8000) { else if (read_u16be(subfile_offset, sf) == 0x8000) {
off_t test_offset = subfile_offset + read_u16be(subfile_offset + 0x02, sf) + 0x04;
if (read_u16be(test_offset - 0x06, sf) != 0x2863 || /* "(c" */
read_u32be(test_offset - 0x04, sf) != 0x29435249) /* ")CRI" */
goto fail;
type = ADX; type = ADX;
extension = "adx"; extension = "adx";
} }
else {
goto fail;
}
temp_sf = setup_subfile_streamfile(sf, subfile_offset, subfile_size, extension); temp_sf = setup_subfile_streamfile(sf, subfile_offset, subfile_size, extension);
if (!temp_sf) goto fail; if (!temp_sf) goto fail;