Skip to content

feat(player): keep TrueHD Atmos heights through Aether's APAC rendering - #454

Merged
Quick104 merged 1 commit into
mainfrom
t3code/truehd-atmos-passthrough-tvos
Sep 25, 2026
Merged

Quick104 merged 1 commit into
mainfrom
t3code/truehd-atmos-passthrough-tvos

Conversation

@Quick104

@Quick104 Quick104 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Apple devices cannot bitstream TrueHD, so Silo decodes TrueHD Atmos as lossless 7.1 PCM. Every height channel and moving object is lost: an Atmos receiver or soundbar never shows Atmos, and AirPods get flat 7.1.

Solution

AetherEngine (Silo-Server/AetherEngine#6) now decodes the TrueHD Atmos object presentation with the new SiloObjectAudio decoder. It renders the objects into a 7.1.4 bed and delivers Apple Positional Audio (APAC). Apple TV sends that to the receiver as Dolby MAT; iPhone, iPad and Mac play it as head-tracked Spatial Audio. This PR turns it on from the app:

  • Setting: a device-local "TrueHD Atmos" playback setting, on by default, with a toggle on tvOS and on iOS/macOS. It maps to LoadOptions.objectAudioRendering = .apac(.l714) through AetherObjectAudioPolicy.
  • One bed for every system: 7.1.4 is fixed. Receivers and soundbars re-render the Atmos they receive onto their own speakers, so there is no speaker-layout picker.
  • Apple TV output gate: Apple TV only uses the path when AVAudioSession.renderingMode reports Dolby Atmos (or reports nothing). An output reporting stereo, multichannel PCM or Dolby Digital keeps the lossless 7.1 bridge, since there the heights would only be folded back into channels.
  • Engine pin and notices: AetherEngine is pinned to the PR commit. THIRD_PARTY_NOTICES.md, the bundled acknowledgements and a new SiloObjectAudio-Apache-2.0.txt record the decoder and the Apache-2.0 truehd crate it embeds.
  • Docs: docs/tvos-player/07-… section 3.3 and the Atmos claim rules cover the new path.

Aether applies it only to TrueHD that FFmpeg marks as Atmos, at 48 kHz, on OS 26 and later. Everything else plays exactly as before.

Validation

  • Builds: SiloTV, Silo and SiloMac build against the pinned engine. AetherPlaybackBoundaryTests pass on the tvOS simulator (59 tests, 2 skipped), including new tests for the policy and the Apple TV output-mode mapping. The CI scripts (ci-scripts.yml) pass locally.
  • Apple TV 4K (2nd generation), tvOS 26.6, into a Sonos Arc over eARC: a signed build was installed through the paired Mac mini. Playing Dolby's "Unfold" TrueHD Atmos demo, the Sonos app reports Dolby Atmos.
  • iPhone 18 Pro, iOS 27, with AirPods: the same title plays with head-tracked Spatial Audio.
  • tvOS and iOS simulators: AVPlayer plays the engine's CODECS="avc1.640029,apac.31.03" stream and seeks forward and back.
  • Shared-dev: an "Atmos Tests" library carries Dolby's Unfold demo (with a Dolby Digital Plus Atmos track for A/B) and the Dolby 7.1.4 speaker check.

Risks

  • Lossy by default: the path is lossy (APAC at 320 kbps per bed channel) where TrueHD used to be lossless 7.1. The setting is on by default because Atmos systems gain heights. Apple TV keeps lossless 7.1 unless its output reports Atmos, and users can turn it off.
  • Detection not confirmed on device: the Apple TV output gate relies on renderingMode reading .dolbyAtmos for Atmos receivers. The Sonos result above was confirmed with an earlier build, before the gate existed.
  • Throughput: the Apple TV 4K (2nd generation, A12) is the slowest supported model and has only had a short session.

Follow-up

AI disclosure: written with Claude Opus 5.5 (claude-opus-5-5) in Claude Code. A Claude Opus 5.5 subagent built the SiloObjectAudio decoder, and a Claude Opus 5.5 reviewer subagent reviewed the change. No other AI tooling was used.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a “TrueHD Atmos” playback setting on iOS and tvOS. When enabled and supported, TrueHD Atmos can be rendered for spatial audio; on tvOS, rendering depends on the reported output mode.
    • When Atmos rendering is unavailable or disabled, TrueHD audio retains lossless 7.1 playback without height channels.
  • Documentation
    • Updated playback guidance and open-source acknowledgements for the audio rendering and its included components.

Adds a device-local "TrueHD Atmos" playback setting (default on). When
on, Aether renders a TrueHD Atmos track's objects into a 7.1.4 bed and
delivers Apple Positional Audio: Apple TV sends it to an Atmos receiver
or soundbar as Dolby MAT, and iPhone, iPad and Mac play it as Spatial
Audio. Apple TV only uses it when its output reports Dolby Atmos, so
setups without Atmos keep the lossless 7.1 bridge.

Pins AetherEngine to the TrueHD Atmos rendering change and records the
new SiloObjectAudio decoder (Apache-2.0) in the third-party notices and
bundled licenses.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 28ab67ba-4378-490d-a4c1-14ede5076e19

📥 Commits

Reviewing files that changed from the base of the PR and between 8f3eb53 and 43b5b61.

⛔ Files ignored due to path filters (1)
  • iosApp/Silo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved is excluded by !**/Package.resolved
📒 Files selected for processing (13)
  • THIRD_PARTY_NOTICES.md
  • docs/tvos-player/07-profile7-dv-truehd-loopback-spec.md
  • iosApp/Resources/OpenSourceLicenses/README.txt
  • iosApp/Resources/OpenSourceLicenses/SiloObjectAudio-Apache-2.0.txt
  • iosApp/Tests/AetherPlaybackBoundaryTests.swift
  • iosApp/iosApp/Screens/Player/AetherLoadSpec.swift
  • iosApp/iosApp/Screens/Player/PlayerSettings.swift
  • iosApp/iosApp/Screens/Player/PlayerViewModel.swift
  • iosApp/iosApp/Screens/Settings/OpenSourceAcknowledgementsView.swift
  • iosApp/iosApp/Screens/Settings/PlaybackSettingsView.swift
  • iosApp/iosApp/Screens/Settings/SettingsViewModel.swift
  • iosApp/iosApp/tvOS/Screens/Settings/TVPlaybackSettingsView.swift
  • iosApp/project.yml
 ____________________________________________________________
< When you say, “I meant to do that,” I totally believe you. >
 ------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@Quick104
Quick104 merged commit 44d414d into main Sep 25, 2026
6 of 7 checks passed
@Quick104
Quick104 deleted the t3code/truehd-atmos-passthrough-tvos branch September 25, 2026 23:42
Quick104 added a commit that referenced this pull request Sep 25, 2026
Brings in #454 and #456 (TrueHD Atmos rendering and the AetherEngine pin),
which touch PlayerViewModel.swift.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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