Repository navigation
Conversation
…hannel it reads on 8-channel STD ports Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
|
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.
|
What
On an 8-channel STD port (
sceAudioOutOpenformat 6 or 7),sceAudioOutSetVolumewith a flag that does not set the rear pairs symmetrically changes the wrong channel: a title that lowers channel 6 alone leaves it at full level and overwrites the gain of channel 4 with an array entry it never flagged.The loop walked host channels, tested flag bit
i, and then readvol[srcIdx]for the swapped channel (4<->6, 5<->7), the orderprepareBufferplays an STD port in. So the flag bit and the array entry named different channels. The loop now tests the flag bit of the channel it reads, using the sameSTD_8CH_MAPasprepareBuffer. Ports that are not STD, and flags that set both channels of a swapped pair (such as0xFF), behave as before.Negative control: the new
audio_out_set_volume_channel_maskplays an 8-channel block through the SDL disk driver with one channel flagged at half volume and the other array entries at 0, for each of the eight channels, on formats 2, 5, 6 and 7, plus a two-channel flag (4 and 7) on the STD formats. Onmainit aborts withonly the flagged channel takes its own volume; with the change it passes.The existing debt entry for
sceAudioOutSetVolume("reads one volume per flagged channel from the array") already describes the intended behaviour, so there is no debt fragment. boykopovar#16597, boykopovar#18272, boykopovar#20630 and boykopovar#24632 edit the same loop for other reasons (range, empty flag, guest copies) and will conflict textually; none of them changes which flag bit is tested.Tested
Linux (WSL2 Ubuntu 24.04, GCC 13.3, Release),
upstream/mainb385636:audio_out_set_volume_channel_mask: fails onmain(Subprocess aborted), passes with the change.audio_out_set_volume,audio_out_mix_level_pad_spk,guest_audio_out: pass with the change.python3 tools/check_conventions.py: all checks passed.Not built on Windows or macOS.
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
Summary by CodeRabbit