feat: SrcChannel, AudiocodecDecoder, and MP3 utilities#7
Merged
AndrewAltimit merged 1 commit intomainfrom Feb 15, 2026
Merged
Conversation
- audio.rs: Add SrcChannel RAII wrapper for the PSP's global SRC (Sample Rate Conversion) channel, separate from the 8 PCM channels. Includes OutputFrequency enum mirroring sys::AudioOutputFrequency. - audiocodec.rs: New high-level sceAudiocodec wrapper with RAII EDRAM management. Documents the reverse-engineered 65-word codec buffer layout (field indices [3-10, 14]) discovered from Sony's mp3play.prx. Supports MP3, AAC, ATRAC3, and ATRAC3plus decoding. - mp3.rs: Add find_sync() for locating MP3 frame sync positions with MPEG version/layer validation, and skip_id3v2() for parsing ID3v2 tags. - sys/codec.rs: Remove incorrect kernel-only feature gate (sceAudiocodec works in user mode with AVCODEC modules loaded). Add derives and #[repr(i32)] to AudioCodec enum. Update documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini AI Code ReviewIssues
Previous Issues(none) Suggestions
Notes
Generated by Gemini AI (gemini-3-flash-preview). Supplementary to human reviews. |
Owner
Author
Review Response Agent (Iteration 1)Status: No changes needed Fixed Issues
Ignored Issues
Deferred to Human
Notes
The agent reviewed feedback but determined no code changes were required. |
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.

Summary
SrcChannelinaudio.rs-- RAII wrapper for the PSP's global SRC (Sample Rate Conversion) channel, a singleton separate from the 8 regular PCM channels. Essential for kernel plugins providing background audio without conflicting with game audio.AudiocodecDecoderin newaudiocodec.rs-- High-levelsceAudiocodecwrapper with RAII EDRAM management. Documents the reverse-engineered 65-word codec buffer field layout (indices [3-10, 14]) discovered from Sony'smp3play.prxdisassembly. Supports MP3, AAC, ATRAC3, and ATRAC3plus.find_sync()andskip_id3v2()inmp3.rs-- MP3 frame sync detection with MPEG version/layer validation, and ID3v2 tag skipping.sys/codec.rs--sceAudiocodec*andsceVideocodec*work in user mode when AVCODEC modules are loaded viasceUtilityLoadModule. The kernel gate was overly restrictive.AudioCodecenum -- Added#[derive(Debug, Clone, Copy, PartialEq, Eq)]and#[repr(i32)].Test plan
cargo +nightly build --features kernel -p psp-- builds cleanly (no new warnings)cargo +nightly build -p psp-- builds cleanly without kernel feature (validates codec gate removal)cargo +nightly fmt --all-- formattedoasis-plugin-pspPRX against this branch -- builds successfullyGenerated with Claude Code