Repository navigation
fix(libSceAudioOut): give HostGainRamp an implicit default constructor - #13658
Conversation
AudioOut.cpp resets a port with `port = Port{}`, which copy-list-initializes
its HostGainRamp member. With the default argument on the explicit
constructor, clang rejects that ("chosen constructor is explicit in
copy-initialization"), so libSceAudioOut does not build on macOS. The default
constructor is now separate and implicit; the one taking the ramp length
stays explicit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The added default constructor delegates to the existing 480-frame initialization, while preserving explicit construction with a caller-supplied ramp length.
What I ran
Reviewed head 06c1bee0721a08f816ef94d38ca44bc8341fa315; PR base 9605300f293b88295e223a27ff8cfecf24d7ab2a. The current-main merge preview used target 7fcab08f71e463b1768730a626a0f5472d336708 and was clean. Environment: Linux x86-64, Python 3.11.2, GCC 12.2 available but not invoked. No local C++ build or test was run.
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13658
python3 tools/check_conventions.py --base 9605300f293b88295e223a27ff8cfecf24d7ab2a --head 06c1bee0721a08f816ef94d38ca44bc8341fa315 --title 'fix(libSceAudioOut): give HostGainRamp an implicit default constructor' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13658-06c1bee0721a/pr-body.md
git diff --check 9605300f293b88295e223a27ff8cfecf24d7ab2a...06c1bee0721a08f816ef94d38ca44bc8341fa315
python3 tools/pr_stack_check.py 13658 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-stack-13658
gh pr checks 13658 --repo boykopovar/AnyPS5Results
| Check | Result |
|---|---|
| Source review | The new zero-argument constructor delegates to DefaultRampFrames (480); the uint32_t constructor remains explicit. The member is included in the existing Port{} reset sites. |
| Diff and conventions | git diff --check exited 0; convention check passed. |
| Current-main merge preview | Clean against 7fcab08f71e463b1768730a626a0f5472d336708; no declared PR dependency. |
| Hosted CI | Windows, library portability, conventions, eligibility, intake, labels, and report passed. Linux and specialized jobs were skipped. |
| Precheck wrapper | It completed its diff/conventions/mergeability checks, but reports failure because the isolated checkout lacks workspace-only pr_abi_audit.py and pr_test_quality.py. This PR changes no exports or tests, so those helper failures do not assess the constructor change. |
Unedited command output
Convention check:
All conventions checks passed.
Stack report:
# PR stack check — fresh
Target: https://github.com/boykopovar/AnyPS5/pull/13658
Target branch tip: `7fcab08f71e463b1768730a626a0f5472d336708`
All heads unchanged: **True**
Dependency order: #13658
## Individual merge previews
- PR #13658: **clean** against current base; head `06c1bee0721a08f816ef94d38ca44bc8341fa315`; changed paths: none reported
## Dependency relationships
No declared PR dependencies were found in the target PR chain.
Hosted checks:
intake pass 18s https://github.com/boykopovar/AnyPS5/actions/runs/41135475725/job/124336734303
library-portability pass 1m48s https://github.com/boykopovar/AnyPS5/actions/runs/41135476487/job/124336734908
windows pass 8m27s https://github.com/boykopovar/AnyPS5/actions/runs/41135475975/job/124337933166
linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41135475975/job/124337935386
register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41135475975/job/124337935758
relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41135475975/job/124337934948
relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41135475975/job/124337935565
write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41135475975/job/124337935119
conventions pass 16s https://github.com/boykopovar/AnyPS5/actions/runs/41135475670/job/124336734552
eligibility pass 4s https://github.com/boykopovar/AnyPS5/actions/runs/41135475975/job/124336732864
labels pass 8s https://github.com/boykopovar/AnyPS5/actions/runs/41135475700/job/124336734353
report pass 34s https://github.com/boykopovar/AnyPS5/actions/runs/41135476151/job/124336733538
git diff --check emitted no output and exited 0.
Findings
Blocking
None found in the reviewed change.
Non-blocking
The author reports an Apple Clang build and 55 matching AudioOut CTest entries passing in a composed tree with other open macOS port PRs; I did not independently verify that run or its complete tree.
Sources
- Constructor change at the reviewed head
- Port member and reset sites at the reviewed base
- Parameterized ramp construction at the reviewed base
Not verified
No local build, CTest, or macOS run was performed. Linux and specialized hosted jobs were skipped; the author's composed-tree test evidence was not reproduced.
|
Checked that the new default constructor delegates to the existing 480-frame default, the explicit |
|
Compile check on macOS (Apple M1, macOS 27.0.1 (26A434), Apple Clang 21.0.0, x86-64 target). Baseline upstream/main 5a14a6c with #13220 merged locally; this PR merged on top. Compiling core/libs/prx/libSceAudioOut/src/AudioOut.cpp with -fsyntax-only (flags replayed from the full build): By inspection the default constructor still configures 480 frames and the explicit-length constructor is unchanged; this is shared code, so Windows and Linux are affected, but I did not compile them. This is a syntax check, not a runtime test. AI-assisted (Codex); I reviewed the logs. |
What
libSceAudioOutdoes not build with clang since each AudioOut port got its ownHostGainRamp(30cca88304).AudioOut.cppresets a port withport = Port{}in four places, which copy-list-initializes thehostGainmember, and the only constructor wasexplicitwith a default argument. clang rejects that withchosen constructor is explicit in copy-initialization(AudioOut.cpplines 397, 485, 648 and 715 onmain140d55e6a0).HostGainRampnow has a separate, implicit default constructor that delegates to the one taking the ramp length. That constructor staysexplicit, soport.hostGain = HostGainRamp(freq / 100)and the tests are unchanged.Tested
macOS 27.2, Apple clang 21.0.0, x86-64 Release.
maindoes not build on macOS by itself, so I built in a tree with the open macOS port PRs, whereHostGain.hppis identical to this branch.libSceAudioOutfails to compile with the four errors above.libSceAudioOutand the AudioOut test executables build, and the 55 CTest entries matchingaudio_out|host_gainpass.HostGainRampareAudioOut.cppandlibSceAudioOut/tests/HostGain.cpp; neither needed a change.Not tested on Linux or Windows; the change only adds a constructor overload.
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