Skip to content

feat(audioout): implement 12-channel AudioOut2 ports - #653

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Celegans12:feat/audioout2-12-channel-ports
Oct 6, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Celegans12:feat/audioout2-12-channel-ports

Conversation

@Celegans12

@Celegans12 Celegans12 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What

sceAudioOut2PortCreate threw for every 12-channel port (data format 0xc00 is not implemented).

  • Ports of 1, 2, 6, 8 and 12 channels, float or int16, fold to stereo through a per-layout table: C, side, back and top front channels at -3 dB (ITU-R BS.775), top back channels at -6 dB (-3 dB into the back pair); LFE dropped. Zero coefficients are skipped, so NaN or Inf on a dropped channel does not reach the mix.
  • Ports of 3, 4, 5 or 7 channels, which were mixed as L/R, now throw, as do other counts and formats with any of bits 12-31 set.
  • Format fields as in KytyPS5, where bit 7 swaps the side and back pairs of an 8-channel port; both fold alike, so bit 7 and the port flags are not decoded. KytyPS5's 12-to-8 fold (audio.cpp) reads the order L R C LFE Ls Rs Lb Rb Ltf Rtf Ltb Rtb, at other gains.
  • Assumed (TechnicalDebt, Unknown function info): the format fields, the channel order and the coefficients.
  • PPSA26344 v1.008 creates two 12-channel float beds (data_format 0xc00, flags 0 and 0x2) and at least 38 mono object ports.
  • feat(audioout): implement sceAudioOut2Set3DLatency and accept sceAudioOut2MasteringInit(0) #649 also appends a test to the end of the libSceAudioOut/CMakeLists.txt test block; whichever merges second needs a one-line rebase.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0, based on main cb33f85: configure -DBUILD_TESTING=ON, full build, --target libs, ctest:
  • 334/334 tests pass (ctest --output-on-failure)
  • New audio_out2_port_layouts: the float and int16 fold of each layout, bit 7, the height channels, an infinite LFE and the formats that throw. Each row fails with its fix removed; on main it fails at the 5.1 row. It and the other audio tests also pass under --repeat until-fail:5.
  • PPSA26344 v1.008: on main the first bed throws; with this change both beds and the object ports are created.
  • Not tested: Linux (CI), console behaviour.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@Celegans12
Celegans12 force-pushed the feat/audioout2-12-channel-ports branch from a66fb58 to 00e216f Compare October 5, 2026 15:51
@Celegans12

Celegans12 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

The Linux job failed on agc_driver_flat_cache_bits timing out at 120 s. This branch does not touch the AGC driver or the shader recompiler, and Windows passed. The test runs 73-105 s on passing Linux runs, and #677 keeps it within CI's time limit, so a re-run of the Linux job (or #677 landing) should clear it.

@Celegans12
Celegans12 force-pushed the feat/audioout2-12-channel-ports branch from 00e216f to 04da162 Compare October 5, 2026 16:53
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 5, 2026
@Celegans12
Celegans12 force-pushed the feat/audioout2-12-channel-ports branch from 04da162 to 67cce61 Compare October 5, 2026 19:12
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 5, 2026
@Celegans12
Celegans12 force-pushed the feat/audioout2-12-channel-ports branch from 67cce61 to 7555c10 Compare October 5, 2026 20:41
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 5, 2026
sceAudioOut2PortCreate threw for 12-channel ports, which PPSA26344
creates as its two 7.1.4 float beds (data format 0xc00).

Each accepted layout (1, 2, 6, 8 or 12 channels, float or int16) now
folds into the stereo mix through a coefficient table: centre, side,
back and top front channels at -3 dB, top back channels at -6 dB into
the front, LFE dropped. Zero coefficients are skipped, so NaN or Inf on
a dropped channel does not reach the mix. Ports of 3, 4, 5 or 7
channels, which were mixed as L/R, now throw, as do other counts and
formats with any of bits 12-31 set. The assumed format fields,
channel order and coefficients are listed in TechnicalDebt.

The new audio_out2_port_layouts test checks each layout's fold, float
and int16, and the formats that throw.
@Celegans12
Celegans12 force-pushed the feat/audioout2-12-channel-ports branch from 7555c10 to 799aaf5 Compare October 6, 2026 00:19
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 6, 2026
@oneandonlydean
oneandonlydean merged commit 8afcf72 into boykopovar:main Oct 6, 2026
3 checks passed
@Celegans12
Celegans12 deleted the feat/audioout2-12-channel-ports branch October 6, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants