Commit Graph

6737 Commits

Author SHA1 Message Date
bnnm
b9bea931a8 cleanup: txtp 2024-07-27 18:39:38 +02:00
bnnm
add7800544 cleanup: bool flags 2024-07-27 15:30:32 +02:00
bnnm
1d0e57583c cleanup: move stuff 2024-07-27 15:22:21 +02:00
bnnm
14419cce34 cleanup: fix potential dereference 2024-07-27 14:43:50 +02:00
bnnm
d98e1c854f cleanup: api misc 2024-07-27 14:42:43 +02:00
bnnm
e79e0bad3f
Merge pull request #1567 from modusc896d352/ongakukan-adp-v3
fix some ongakukan .adp
2024-07-26 21:04:06 +02:00
modusc896d352
3fa266364e fix some ongakukan .adp, part II
upped diff "beyond than" checks to 14 to allow some other adp file to actually work.
2024-07-25 20:03:59 -03:00
modusc896d352
3145f7ebe4 fix some ongakukan .adp
at least one adp file from midousuji-sen was found to have a "fact" chunk at offset 0x24 instead of the usual 0x26. this caused vgmstream to not play said file at all.

not only does this commit fixes this, it also adds additional checks to the "adp_ongakukan" meta.

this includes the introduction of the "diff" variable whose purpose is to subtract the difference between expected_size and pcm_size. meta will now only proceed if diff is between 0 and 2 (sorta).

as for the "fix" itself, it required the introduction of the "fact_offset" variable.

fact_offset adds both fmt_offset and fmt_size so that "fact" chunk signature can be read (and checked against adp file within the meta) properly instead of always requiring "fact" to be at 0x26.

fact_offset is also checked if it goes below 0x24 and above 0x28.
2024-07-25 19:06:14 -03:00
bnnm
808a3233a8
Merge pull request #1564 from bnnm/api-misc4
api misc4
2024-07-25 20:26:39 +02:00
bnnm
f922e7018c cleanup: fix compiling .awc without ffmpeg 2024-07-25 19:25:07 +02:00
bnnm
0b2a134c62 cleanup: fix crap 2024-07-25 19:10:46 +02:00
bnnm
6fe61717d2 cleanup: tweaks, debug sample buffer option 2024-07-25 18:57:40 +02:00
bnnm
7b76726523 cleanup: fix missing include in vgmstream123 2024-07-25 18:22:18 +02:00
bnnm
1ca6207b46 cleanup: misc fixes 2024-07-25 18:21:23 +02:00
bnnm
9c315221eb cleanup: mixer 2024-07-25 17:16:12 +02:00
bnnm
aad9c819aa cleanup: reorder some cli code 2024-07-25 17:15:49 +02:00
bnnm
88b54b5257 cleanup: misc 2024-07-25 13:26:29 +02:00
bnnm
d96cf21fc0 cleanup: SNDP rename 2024-07-25 12:47:52 +02:00
bnnm
1039e6fbb7 cleanup: SNDP 2024-07-25 12:47:15 +02:00
bnnm
17ad1afa09 cleanup: separate init functions into its own file 2024-07-25 12:27:22 +02:00
bnnm
6d1a4bfc03 cleanup: misc preparations 2024-07-25 11:19:00 +02:00
bnnm
a6a113d813 cleanup: crlf/etc 2024-07-25 11:17:01 +02:00
bnnm
2169f50259 cleanup: update github actions versions 2024-07-25 11:08:07 +02:00
bnnm
161e7cbed6 cleanup 2024-07-24 17:57:15 +02:00
bnnm
c1dfa4d274 cleanup: mixer 2024-07-24 00:00:27 +02:00
bnnm
93de444987 cleanup: mixer 2024-07-23 23:51:44 +02:00
bnnm
4ed61e3740 cleanup: mixing 2024-07-23 22:50:36 +02:00
bnnm
693b4685bb cleanup: simplify mixing 2024-07-23 22:31:30 +02:00
bnnm
f1464ac2cc cleanup: minor stuff 2024-07-23 22:31:13 +02:00
bnnm
ae16779577
Merge pull request #1561 from bnnm/api-misc3
- Fix some .agsc [Metroid Prime (GC)]
- Remove fake .b1s format (use .txth)
- Remove fake format .ffw (use .txth)
- cleanup
2024-07-21 22:27:46 +02:00
bnnm
4670014664 cleanup: missing include 2024-07-21 22:20:29 +02:00
bnnm
60676753ba Remove fake format .ffw (use .txth) 2024-07-21 18:25:50 +02:00
bnnm
c701412dca cleanup: api stuff 2024-07-21 18:22:56 +02:00
bnnm
637c93b694 cleanup: cli utils 2024-07-21 18:22:42 +02:00
bnnm
f6b2c6fab3 Fix some .agsc [Metroid Prime (GC)] 2024-07-21 09:50:28 +02:00
bnnm
9631e02689 cleanup: atx > apa3 2024-07-19 15:48:54 +02:00
bnnm
4168673bbd Remove fake .b1s format (use .txth) 2024-07-19 15:09:52 +02:00
bnnm
2a49524ded
Merge pull request #1560 from EdnessP/master
Sony BNK: v12 support (Late PS3/Early PS4)
2024-07-19 14:38:31 +02:00
EdnessP
68d15330ea Sony BNK: v12 support (Late PS3/Early PS4) 2024-07-19 10:24:00 +03:00
bnnm
644da84023
Merge pull request #1559 from bnnm/api-misc2
- Fix some Ongakukan .adp + cleanup
- cleanup
2024-07-19 00:05:49 +02:00
bnnm
332512f912 doc 2024-07-18 23:53:28 +02:00
bnnm
a8dc7edb9a cleanup: renames 2024-07-18 23:52:55 +02:00
bnnm
135279b483 cleanup: iivb, etc 2024-07-18 23:51:38 +02:00
bnnm
b0962ea354 cleanup: api tweaks 2024-07-18 23:50:45 +02:00
bnnm
ea630eeead cleanup 2024-07-18 23:50:22 +02:00
bnnm
33f01354e6 Fix some Ongakukan .adp + cleanup 2024-07-18 22:43:13 +02:00
bnnm
b916d2685e
Merge pull request #1558 from modusc896d352/ongakukan-adp-v2
Add Ongakukan .adp [Train Simulator (PS2), Mobile Train Simulator (PSP)]
2024-07-18 19:53:29 +02:00
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