Commit Graph

4951 Commits

Author SHA1 Message Date
modusc896d352
61c5803cce fix crash with compiled VS2022 binary
- apparently, freeing data->samples from free_ongakukan_adp (ongakukan_adp_decoder.c) causes heap corruption everywhere because it was already freed to begin with!
-- removing the offending line of code will no longer crash VS2022 builds of vgmstream.
2024-07-17 22:32:41 -03:00
modusc896d352
edde33489b Ongakukan ADPCM code improvements
significant improvements include:
- char flags in ongakukan_adp_lib.c have all, with one exception, been made to bools.
-- ATM, sample_mode will remain a char.
-- several other variables have been removed. they did not affect decoding in any significant way.
-- init_ongakukan_adpcm now accepts at least one bool as an argument for a total of four arguments.
-- many function from lib renamed to follow external lib function naming standard.

- simplified ongakukan_adp_decoder.c
-- decode_ongakukan_adp in particular benefited from this code simpification; loop is now re-done so all samples are copied to outbuf when they're made available.
-- as a consequence of this, at least one var was removed entirely, while others have been redefined into different purposes; samples_filled is now a bool var that flags whether or not all available samples were decoded.
-- init_ongakukan_adp has four arguments as well, and accepts at least one bool as an argument of its own.
-- streamfile is now close there as well instead of in the external decoder lib.

- adp_ongakukan.c saw much simpified code as well; meta checks have been relaxed significantly, which meant the removal of several var and at least three vars repurposed into bools.
-- supposed_size is introduced as an entirely new var; it now calculates the supposed file size of an ADP file with several 32-bit fields from the first byte as a base.
-- consequently, file_size checks are now made against supposed_size.

- as a consequence of all of the above, riff.c has now lost an additional RIFF size check; initially if RIFF chunk reported a big-enough size than RIFF file realistically has, it would be enough for vgmstream to stop working with said file.
2024-07-17 21:58:06 -03:00
modusc896d352
2eef6b4535 fix for borked ADP decoding upon playback
till now, Ongakukan ADPCM decoder worked by "samples filled" and "samples consumed" var from ongakukan_adp_decoder.c ("decoder code" henceforth) get values from ongakukan-adp_lib.c ("decoder lib code" henceforth). samples done was also not initialized to 0 in decoder code, which led to "stuttery" playback with ADP files when decoded sound data from those same files would endlessly repeat by about half-a-second till it reached duration.

this commit fixes this; ADP files are now decoded from beginning-to-end, and you'll be getting no "repeating" sounds literally every second. instead you'll be getting the sound data the way you'd listen to them in-game.
2024-07-17 18:22:38 -03:00
modusc896d352
1d2ab676ec Add Ongakukan ADPCM decoder
[Train Simulator: Midousuji-hen (PS2)]
2024-07-17 16:58:11 -03:00
bnnm
e607b03284 cleanup: misc 2024-07-14 22:09:21 +02:00
bnnm
9c641c0dc1 cleanup: renames 2024-07-14 21:40:37 +02:00
bnnm
c3a391dc0b Minor tweak in TXTH path handling 2024-07-14 21:17:02 +02:00
bnnm
5168434c52 cleanup: split stuff 2024-07-14 21:15:52 +02:00
bnnm
70695617a8 api: add beta api 2024-07-14 20:31:50 +02:00
bnnm
00a8ee7875 cleanup: split 2024-07-14 20:27:58 +02:00
bnnm
6805937d1b cleanup: misc doc/fixes 2024-07-14 20:24:53 +02:00
bnnm
5f5eacd824 cleanup: fix slow opus parsing on bad data 2024-07-14 19:45:54 +02:00
bnnm
25c2375f5d
Merge pull request #1554 from EdnessP/master
- Fix broken Asura DSP .SFX header check
- Improve EA MSB based on EA AMB research
2024-07-08 17:00:09 +02:00
bnnm
316c0eecd6 api: beta defs/tests 2024-07-07 21:25:59 +02:00
bnnm
b1b218bea5 doc/cleanup 2024-07-07 21:25:21 +02:00
EdnessP
aa325ea0aa EA MSB: fixes based on EA AMB research 2024-07-07 20:52:16 +03:00
EdnessP
28c6dc4218 DSP: fix asura header checks 2024-07-06 23:05:54 +03:00
bnnm
761a759d50 cleanup: fsb 2024-07-06 14:25:18 +02:00
bnnm
1c7a330ba7 cleanup: remove unused fsb .wii 2024-07-06 01:28:17 +02:00
bnnm
305466196c doc 2024-07-06 01:26:08 +02:00
bnnm
2ee639d6f5 log: misc helper 2024-07-06 01:25:58 +02:00
bnnm
cd54cd57cd Add FSB key + cleanup 2024-07-06 01:25:41 +02:00
bnnm
59d560d480 Fix .fsb with XMA + basic headers [Forza 3 (X360)] 2024-07-06 01:25:15 +02:00
EdnessP
695b7c231b EA: small cleanups 2024-07-03 17:30:07 +03:00
EdnessP
f681a54462 EA SCHl: indent fixes 2024-07-03 14:14:59 +03:00
EdnessP
c9935d93af EA SCHl: indent fixes 2024-07-03 13:10:46 +03:00
EdnessP
8db6820f65 EA ABK: Redwood Shores AMB/AMX variant 2024-07-03 13:00:13 +03:00
EdnessP
272fd2eac6 EA: cleanups and renames 2024-07-03 01:38:43 +03:00
EdnessP
136b1b760c EA BNK/SCHl: split up distinct formats 2024-07-03 00:33:38 +03:00
EdnessP
d78141c90e VAG: THQ Australia variant 2024-07-01 16:02:20 +03:00
EdnessP
e5eacbdbd3 EA SCHl: schl_video extensions 2024-06-29 15:05:30 +03:00
EdnessP
080921915b ADM: comment consistency 2024-06-27 17:42:06 +03:00
EdnessP
95747bceef ADM3: GRN1 chunk 2024-06-27 17:31:49 +03:00
EdnessP
e5834f7da2 ADM3: fix SMB1 table unk value 2024-06-27 15:38:13 +03:00
EdnessP
2a99841321 XWB: SB:LCP! xsb pairs 2024-06-27 15:34:14 +03:00
bxaimc
966327e359 add hca key 2024-06-18 17:55:39 -04:00
bnnm
dd69f9dd3a Add HCA key 2024-06-17 19:53:48 +02:00
bnnm
6d4fbd742e Fix TXTH samples for mono MS-IMA/MSADPCM 2024-06-17 19:53:38 +02:00
bnnm
bca25b878b
Merge branch 'master' into master 2024-06-14 19:23:41 +02:00
EdnessP
66b28e135d AWD: fixed codec enum 2024-06-14 00:36:52 +03:00
EdnessP
8591975e1c XWB: set null terminator in get_name on fail 2024-06-14 00:22:51 +03:00
EdnessP
80e8a9566a AWD: codec enums 2024-06-13 18:19:15 +03:00
EdnessP
e324851dc1 BNK/XWB: bank names in stream names 2024-06-13 18:14:47 +03:00
bnnm
7d838f55d0 cleanup: fix rare leaks and misc tweaks 2024-06-12 22:29:31 +02:00
bnnm
7b8ea3319a cleanup: update miniz to v3.0.2 2024-06-12 22:27:18 +02:00
bnnm
97b1aa23e0 Fix interleaved MS_IMA [Manhunt (PC)] 2024-06-12 22:24:53 +02:00
EdnessP
2ed74f3218 DSP: .rsm extension 2024-06-12 19:38:01 +03:00
EdnessP
d2d5b3f4be VAG: Evolution Games variant 2024-06-12 18:54:38 +03:00
bnnm
9b90a7a260 cleanup: minor codec renames 2024-06-11 00:36:54 +02:00
bnnm
1fc156badc doc 2024-06-11 00:05:04 +02:00
bnnm
ca8cae134d cleanup: warning/etc 2024-06-11 00:03:48 +02:00
bnnm
311e981327 Add .ktsl2asbin with KTAC [Blue Reflection 2 (PS4)] 2024-06-11 00:02:37 +02:00
bnnm
1091e8d1e7 cleanup: move semi-external libs to subdir for clarity 2024-06-11 00:01:17 +02:00
bnnm
f2b42dd9c4 Fix some .xnb [Miner: Dig Deep (X360)] 2024-06-07 13:24:43 +02:00
bnnm
6d0eaab28c Add TXTP frame_size + interleave for MS_IMA [Manhunt (PC)] 2024-06-07 13:23:57 +02:00
EdnessP
2198d3f2b5 AWD/RWS: codec index/uuid research notes 2024-06-04 13:53:51 +03:00
Adam Higerd
95016f4e6e Fix build without USE_MPEG 2024-06-02 19:10:33 -05:00
Michael
cc7bb7421b fix comments for recent additions 2024-05-26 20:34:05 -07:00
Michael
f7d048fb38 add hca key 2024-05-26 20:33:44 -07:00
EdnessP
293070404f EA MSB: todo notes 2024-05-25 01:46:14 +03:00
EdnessP
31b7447af3 DSP: checks consistency 2024-05-25 00:11:05 +03:00
EdnessP
a87bb2cd73 DSP: LE (NSW) Asura engine variations 2024-05-24 23:44:05 +03:00
EdnessP
69ab3d9161 DSP: Asura engine variants 2024-05-24 17:43:16 +03:00
bnnm
b88e06cebe Remove .mihb fake extension (use .mic) 2024-05-21 23:33:29 +02:00
bnnm
6157a86e3f cleanup: mic renames 2024-05-21 23:32:04 +02:00
bnnm
24750abf6f cleanup: pointer/misc 2024-05-21 23:28:17 +02:00
EdnessP
7354d12c85 Cleanup 2024-05-20 22:36:19 +03:00
EdnessP
f6ccd77b41 EA MPF+MUS: EA Redwood Shores variant 2024-05-20 02:05:03 +03:00
EdnessP
a22377f980 VAG: EoR/Maxis engine variations 2024-05-19 15:43:32 +03:00
EdnessP
a3be024fe2 MIH+MIB: merge MIC parser 2024-05-17 12:20:45 +03:00
EdnessP
88043ea4da EA SBK: additional format variations 2024-05-12 09:58:49 +03:00
bnnm
ec151b55b0 doc 2024-05-11 15:32:51 +02:00
bnnm
9b1e3369f7 Add RIFF .SE extension [Rockman X4 (PC)] 2024-05-11 15:32:40 +02:00
bnnm
18a7137439 Fix some .stx [Phantom Dust Remaster (PC)] 2024-05-11 15:32:00 +02:00
EdnessP
17fe0be877 EA SBK: Confirm LE sdat chunks exist (Godfather II) 2024-05-09 19:48:08 +03:00
EdnessP
70272bf73b EA SBK: misc changes 2024-05-09 13:19:14 +03:00
EdnessP
3fdbe757ae EA SBK: Safety checks 2024-05-09 05:31:44 +03:00
EdnessP
e699c53cf3 EA SBK: Remove unnecessary comment 2024-05-09 03:50:32 +03:00
EdnessP
627b397daa visual studio doing random things... 2024-05-09 03:20:39 +03:00
EdnessP
09155bef1e EA SBK: sbnk+sdat/BNKx 2024-05-09 03:12:13 +03:00
bnnm
511a13b7d0 cleanup: remove unused MPEG_AWC 2024-05-03 13:51:28 +02:00
bnnm
d520593fcb Fix some MPEG .awc [GTA V (PS3)] 2024-05-03 13:48:23 +02:00
bnnm
88c5abba00 Add RAGE aud MPEG [GTA IV (PS3)] 2024-05-03 13:45:59 +02:00
bnnm
5005788fb5 doc/util 2024-05-03 13:41:31 +02:00
bnnm
0f7e431244 doc 2024-04-28 23:28:08 +02:00
bnnm
c30ed29a3a ogg vorbis: accept 'loop_end' for rare cases 2024-04-28 23:25:53 +02:00
bnnm
0617dd3190 Add .psb Ogg [Legend of Mana (Android)] 2024-04-28 23:24:20 +02:00
bnnm
e7b1b98860 Add RAGE aud XMA [GTA IV (X360)] 2024-04-28 23:23:13 +02:00
bnnm
c12bdb004c Add .snd MSF extension [HamsterBall (PS3)] 2024-04-28 23:21:53 +02:00
bnnm
43d107a482 Add .voi ATRAC3 [Sol Trigger (PSP)] 2024-04-28 23:21:24 +02:00
bnnm
9161d2e06c cleanup: improve .rkv validations 2024-04-28 23:20:33 +02:00
bnnm
4ae8549e50 Fix some XMA .awc [Red Dead Redemption (X360)] 2024-04-28 23:19:48 +02:00
EdnessP
611db38335 RAGE AUD: Additional todo note (potential size check fail) 2024-04-19 15:44:47 +03:00
EdnessP
952d0f3830 RAGE AUD: Rename IVAUD 2024-04-19 05:04:27 +03:00
EdnessP
2dd03f1ff5 RAGE AUD: Better BE support 2024-04-19 04:48:07 +03:00
bnnm
1185bf0689 cleanup: experiment 2024-04-14 00:51:42 +02:00
bnnm
55e6ec3244 Add HCA key 2024-04-13 20:24:55 +02:00
bnnm
9927887e17 doc 2024-04-13 20:24:40 +02:00
bnnm
dc5fe71c21 Add .bgm extension to SVS [Unlimited Saga (PS2)] 2024-04-13 20:24:18 +02:00
bnnm
f25eacdb52 Fix PCM-only EAMP3 [EA Sports FC24 (PC)] 2024-04-13 20:23:24 +02:00