Repository navigation
feat(ngs2): decode complete HE-VAG waveform blocks - #10994
Closed
ElysiaAlarien wants to merge 1 commit into
Closed
ElysiaAlarien wants to merge 1 commit into
ElysiaAlarien wants to merge 1 commit into
Conversation
Recognize VAGp waveforms in sceNgs2ParseWaveformData and sceNgs2ParseWaveformFile and let the sampler play them. Complete blocks decode to PCM16 with vgmstream's psv_decoder.c, from the vgmstream submodule already in the tree, before the existing renderer applies pitch, repeats and mixing. Embedded loops, streaming append, dataless blocks and nonzero configuration data throw. Rebased onto current main from boykopovar#5797: the submodule and packaging changes are dropped because main already carries them, and the debt entry no longer says VAG block calculation throws. Co-Authored-By: Mohd Faour <mohdfaour03@example.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thank you for your contribution! Authors with no pull requests merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
sceNgs2ParseWaveformDataandsceNgs2ParseWaveformFilereturnSCE_NGS2_ERROR_UNKNOWN_WAVEFORM_FORMATforVAGpdata, so a title that passes a VAG file to NGS2 gets an empty waveform and no sound (#5677, Steins;Gate Re:Boot, PPSA36591).This recognizes
VAGpversions0x20001and0x30000(0x30-byte header, 16-byte channel interleave, waveform type0x1c) and lets the sampler play them. Complete submitted blocks are decoded to PCM16 with vgmstream'spsv_decoder.c, built from the3rdparty/vgmstreamsubmodule that is already onmain, and the existing renderer applies pitch, repeats and mixing. Skipped samples and block repeats work. Embedded loop flags, streaming append, dataless blocks and nonzero configuration data throw. The debt entry lists what is unverified.This is a rebase of #5797 by @mohdfaour03 onto current
main, carried with their commit's authorship credited (Co-Authored-By). #5797 was closed on 2026-10-23 for waiting on a rebase, with an invitation to reopen it. Differences from #5797:.gitmodulesor packaging change:mainalready has the submodule at the same commit and already packs itsCOPYING;Atrac9.cpptoNgs2Types.hpp;Hevagadded to the ngs2 test list onmain;sceNgs2CalcWaveformBlockhandles VAG onmain.Tested
Windows 10, WinLibs GCC 15.2, Release,
BUILD_TESTING=ON, onmainas of rebase time:libSceNgs2andlibSceNgs2.nativeand all ngs2 test targets;ctest -R ^ngs2_passes 15 of 15, including the newngs2_hevag(synthetic mono and stereo fixtures, malformed headers, file offsets, skipped samples, repeats, silence flags, four-tap prediction, history across frames within a block, rejected settings);tools/check_conventions.py --base origin/mainandgit diff --checkpass;tools/pr_overlap.pylists no overlapping lines or exports; it could not compare feat(ngs2): add experimental I3DL2 reverb #1384, fix(ngs2): retain PCM input when reporting decoded bytes #5548, feat(ngs2): play additional PCM sampler formats #10127, fix(libSceNgs2): clamp the mastering gain to +-32 and keep NaN, as the PS5 module does #10410, feat(ngs2): implement the custom Reverb module #10599 and feat(ngs2): route custom submixer buffers through Gain #10851 because they conflict withmain. They edit the same Ngs2 files, so whichever lands second rebases.Not tested: PPSA36591 (I do not have it), the full repository test suite, Linux, macOS, and comparison with console output. On #5797, @milescoviello ran PPSA36591 on Linux: 22 HE-VAG waveforms in four shapes parsed and decoded to non-silent PCM with no NGS2 error in 150 s. That run was on the older #5797 head, not on this branch, and it did not compare samples with a console.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code