Skip to content

Address Codex review findings on merged #489, #493, #494 (audio, tools) - #497

Merged
RINNECODER merged 2 commits into
mainfrom
fix/codex-review-audio-tools
Oct 14, 2026
Merged

RINNECODER merged 2 commits into
mainfrom
fix/codex-review-audio-tools

Conversation

@RINNECODER

Copy link
Copy Markdown
Owner

Triage of Codex connector findings left unaddressed on merged PRs. Upstream main had none of these fixed (checked read-only).

PR Path Verdict Fix or reason
#489 libSceNgs2.native/src/Custom.cpp real Custom-submixer voices now run their filter chain after mixing (shared ApplyFilters in Render.cpp). Test: TestCustomSubmixerAppliesFilter.
#489 libSceNgs2.native/src/Voice.cpp not real sceNgs2VoiceGetState already has a SCE_NGS2_RACK_ID_CUSTOM_SAMPLER case returning Ngs2CustomSamplerVoiceState, a distinct 48-byte struct (existing test covers it); returning the sampler struct would break the size contract.
#489 libSceNgs2.native/src/Render.cpp real EMPTY state flag now also set for custom-sampler voices. Test: TestCustomSamplerReportsEmpty.
#493 tools/unwrap_self.py real Record table read from 0x20, bounded by the header entry count (u16 at 0x18), as tools/unself.py does.
#493 tools/unwrap_self.py real Only records with flags 0x800 are data; each is assigned to program header (flags >> 20) & 0xffff. Duplicate indexes are refused. Tests: equal-sized swap with a digest decoy, duplicate refusal, first record at 0x20.
#494 libSceAjm.native/src/Ajm.cpp real Before the first frame is decoded, room is checked against the ADTS channel count (1 for raw) and one AAC-LC frame (1024 samples), so a too-small output returns NOT_ENOUGH_ROOM with the input unconsumed. Not unit-testable here (needs a built FFmpeg and an AAC stream); syntax-checked against the bundled headers.
#494 tools/unwrap_self.py real Same change as the #493 index mapping: size matching removed, records matched by encoded program index, ambiguous tables refused.
#494 tools/check_compile.py real Compile-command keys are resolved against the repository root (external sources keyed by absolute path). Test: build directory beside the checkout.

Tests run: tools/tests unwrap_self and check_compile (26 pass; new ones fail on origin/main code), NGS2 custom/render/filter/stream tests (pass; new custom tests fail on old Render.cpp).

🤖 Generated with Claude Code

NGS2: custom-submixer voices now run their filter chain after mixing; a
drained custom-sampler stream reports the EMPTY state flag like a
sampler. AJM M4AAC: the first non-delay frame is sized from the ADTS
channel configuration and one AAC-LC frame before FFmpeg consumes it.
tools: unwrap_self reads the SELF record table from 0x20 bounded by the
header entry count, keeps only data records and assigns each by its
encoded program index (duplicates refused); check_compile keys compile
commands against the repository root so sibling build trees work.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f5856c21-f98c-4796-89d5-dd4198b891f8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T16:26:10.752512Z 33ee445 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33ee445fa4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (instance.aacDelayFrames == 0) {
if (roomChannels == 0) {
AdtsHeader header{};
roomChannels = !raw && ParseAdtsHeader(data, header) ? header.channelConfig : 1;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use the configured channel count for raw AAC

When non-delay output is enabled for a raw stereo or 5.1 instance, the first-frame check always assumes one channel even though OpenAac configures the decoder with AacRawChannels(instance). An output buffer large enough for 1024 mono samples therefore passes this check, FFmpeg consumes the access unit, and the later decoded-size check throws because the actual multichannel frame does not fit, rather than returning AJM_RESULT_NOT_ENOUGH_ROOM with the input unconsumed. Use the raw instance's configured channel count here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Real, fixed in the latest push: raw input now uses AacRawChannels(instance), the same count OpenAac configures the decoder with.

@RINNECODER
RINNECODER merged commit 007f8d8 into main Oct 14, 2026
5 checks passed
@RINNECODER
RINNECODER deleted the fix/codex-review-audio-tools branch October 14, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant