Skip to content

cellAudio: clear each consumed ring buffer block - #83

Open
canersaka wants to merge 1 commit into
sp00nznet:ps3recompfrom
canersaka:fix/cellaudio-block-clear
Open

cellAudio: clear each consumed ring buffer block#83
canersaka wants to merge 1 commit into
sp00nznet:ps3recompfrom
canersaka:fix/cellaudio-block-clear

Conversation

@canersaka

Copy link
Copy Markdown
Contributor

The audio consumer advanced the read index after mixing a block but left the consumed samples in guest memory. A producer that does not completely overwrite that slot before it wraps around can therefore replay stale PCM from the previous trip through the ring. RPCS3's cellAudio consumer clears the block before advancing the read position for the same reason.

This zeros exactly the consumed block after it has been copied into the host mix buffer and before the read index is published. The producer-visible read-index behavior and the existing sample conversion stay unchanged.

Verified: ps3recomp_runtime builds clean from the current ps3recomp staging base with this as the only changed file. I also traced the consume order against RPCS3's reset_ports(0) path; the clear is on the consumed slot before the read position advances, not on the producer's next slot.

Zero a port block after mixing it and before publishing the next read index. This matches the AudioServer contract, prevents a stalled producer from replaying stale PCM, and preserves the cleared-block consumption signal used by producers.
@canersaka
canersaka marked this pull request as ready for review July 25, 2026 05:56
sp00nznet added a commit that referenced this pull request Aug 15, 2026
Folds every foldable open PR onto master: the #90/#82/#81/#79/#78 integration chain (fast-forward) plus canersaka's six fix PRs (#83-#88) cherry-picked with authorship preserved. Build clean, ctest 1/1.
tsautier pushed a commit to tsautier/ps3recomp that referenced this pull request Aug 15, 2026
… ABI/lv2 batch)

CONTRIBUTORS.md gains canersaka's six-PR batch (sp00nznet#83-sp00nznet#88); README gets an
Unreleased changelog section covering everything folded via
integrate/fold-2026-08-14, attributed per fix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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