From 2e44b1e051d4fac4d61572b398c7eee1900fbb80 Mon Sep 17 00:00:00 2001 From: EdnessP <55930127+EdnessP@users.noreply.github.com> Date: Thu, 27 Jul 2023 00:44:38 +0300 Subject: [PATCH] VAG: Remove bigfile check temporarily --- src/meta/vag.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/meta/vag.c b/src/meta/vag.c index c8979ea6..de61c195 100644 --- a/src/meta/vag.c +++ b/src/meta/vag.c @@ -287,9 +287,10 @@ VGMSTREAM* init_vgmstream_vag(STREAMFILE* sf) { goto fail; } - /* ignore bigfiles and bad extractions (approximate) */ - if (channel_size * channels + interleave * channels + start_offset * channels + 0x8000 < get_streamfile_size(sf) || - channel_size * channels > get_streamfile_size(sf)) { + /* ignore bad extractions (approximate) */ + /* bigfile ignoring breaks some of Jak series' VAGs (unless increased to roughly 1.4 MiB) */ + //if (channel_size * channels + interleave * channels + start_offset * channels + 0x80000 < get_streamfile_size(sf) || + if (channel_size * channels > get_streamfile_size(sf)) { vgm_logi("VAG: wrong expected (incorrect extraction? %x * %i + %x + %x + ~ vs %x)\n", channel_size, channels, interleave * channels, start_offset * channels, (uint32_t)get_streamfile_size(sf)); goto fail;