Repository navigation
fix(ngs2): accept empty waveform blocks and matrix levels on a voice without a format - #5660
Conversation
|
A second title reaches this, plus a reference for the behaviour. Void Terrarium (PPSA03061), Windows 11, MinGW GCC 15, Release. This is on Reference: KytyPS5's AI-assisted: yes (Claude Code) |
|
Thanks, that's very helpful. I added the Void Terrarium run and the KytyPS5 reference to the description. AI-assisted: yes |
9808345 to
5a921f0
Compare
|
Another title hits the same throw: Void Terrarium (PPSA03061), Windows 10, on AI-assisted (Claude Code). |
|
Thanks for checking it on a clean AI-assisted: yes |
|
Windows check for STEINS;GATE RE:BOOT (PPSA36591): with this change the title no longer stops on
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release. Limits: one title; I did not see the screen, so whether audio plays or the menu advances is not verified, only that the process no longer aborts; this pull request's own tests were not run; the "without" run is on AI-assisted (Claude Code). |
5a921f0 to
91b319e
Compare
…without a format A sampler voice set up with an all-zero format has no channels. Adding no waveform blocks to it, or setting a matrix with no levels, threw std::invalid_argument, which ends the title. Accept both on such a voice: the empty add only applies RESET and the CONTINUE state, and the empty matrix clears that matrix, which rendering already treats as unset. Blocks with data, APPEND, and an empty matrix on a voice with a format are still refused. Steins;Gate Re:Boot (PPSA36591) clears a voice this way when a button is pressed at its title screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ception Co-Authored-By: Claude <noreply@anthropic.com>
|
Checked on the PR merged onto current main: Added one commit: the "NGS2 matrix levels" debt line still said a count of 0 always throws, so it now names the exception for a voice without a format. Merging once CI is green. |
91b319e to
a8be2c8
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
What
Steins;Gate Re:Boot (PPSA36591) ends when a button is pressed at its title screen:
With temporary prints (not part of this PR), the title clears a sampler voice:
SCE_NGS2_SAMPLER_VOICE_PARAM_SETUPwith an all-zero format.SetupSampleralready accepts this and leaves the voice without a format (0 channels).ADD_WAVEFORM_BLOCKSwithnum_blocks0 and flags 0, with non-nullblocksanddata.AddWaveformBlocksrefused it because the voice has no channels.MATRIX_LEVELSfor matrix 0 withnum_levels0.SetMatrixLevelsrefused it because there are no levels.On a voice without a format, both are now accepted:
APPENDappliesRESETand theCONTINUEstate, as it would on any voice, and adds nothing.ResetSetupleaves;Render.cpptreats it as no matrix.KytyPS5's
AddWaveformBlocks, which the libSceNgs2.native debt file already cites for the sampler, does the same for no blocks: its loop adds nothing, it takesCONTINUEfor whether the voice accepts blocks, and it returns OK. It uses the channel count only to size each block.Blocks with data,
APPEND, and an empty matrix on a voice that has a format are still refused, so the existing check inNgs2Render.cpp(zero levels on a set-up sampler voice) is unchanged. What the console returns for these calls is not measured; the libSceNgs2.native debt file records the assumption and the title.ngs2_streamgainsTestNoBlocksForClearedVoice: the title's sequence passes, and a block with data,APPEND, and an empty matrix with an out-of-range id are refused on that voice.Tested
Ubuntu 24.04, GCC 13.3 (CI's compiler), Release with CI's configure flags, on
main75690a1:main'sVoice.cppand the new test,ngs2_streamfails with the title's message,AddWaveformBlocks: invalid argument. With the change it passes 5/5, and all 10ngs2_*tests pass in 3 runs.--to-inteland run on Linux (RTX 4070 Ti), with scripted pad input from 8 s:AddWaveformBlockspart it stops about 20 s in withSetMatrixLevels: invalid argument.mainwith feat(ces): implement sceCesUcsProfileInitSJis1997Cp932 #5153, feat(libSceCesCs): build libSceCesCs-module from the libSceCesCs source #5425, feat(libSceNgs2): support custom rack module id 0x1d (UserFx) and legacy callback dispatch #5140 and feat(libSceAgc): ignore address argument on non-sample-dump events in sceAgcDcbEventWrite #5219. It stops 25 to 35 s in withAddWaveformBlocks: invalid argumenton the same calls (a sampler voice with no format,ADD_WAVEFORM_BLOCKSwith no blocks and flags 0). With theAddWaveformBlockspart of this change it keeps running for the whole 260 s run. That run did not reach the matrix-levels path.maina077a88 it aborts withAddWaveformBlocks: invalid argument3 s after the first Enter; with this head onmaind92a8da, a 600 s run with 31 key presses reaches its limit with no exception, at about 59.9 FPS.-fsyntax-onlycompile ofVoice.cpphas no errors.tools/check_conventions.py --base upstream/mainpasses, andtools/pr_overlap.py --branchfinds no overlap.Not checked on a console. On Windows, only the Void Terrarium and Steins;Gate runs above.
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