Skip to content

fix(playback): advertise PCM so WAV audiobooks can play - #707

Merged
Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/1253-audiobook-wav
Nov 16, 2026
Merged

Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/1253-audiobook-wav

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-server#1253
Validation tasks: unblocks #349 C6; unblocks #350 C6

WAV audiobooks never play on Android. Opening one shows "No validated playback route is available for this audio source." on phone, tablet and TV, every time.

The app advertises the wav container but no PCM codec. The server's audio-only planner direct-plays only codecs the client lists, and progressive server remux isn't available to Android, so a WAV file has no route. Media3 plays PCM natively, so this change advertises it.

Approach

When the platform has the audio/raw decoder that Media3 uses for WAV, the capability detector advertises pcm_u8, pcm_s16le, pcm_s24le, pcm_s32le and pcm_f32le, and the TV pre-playback audio check accepts audio/raw. No server change is needed. PCM tracks in other containers the app already lists (MKV, MOV) will now direct-play too.

Validation

  • New capability-detector test; it failed before the change.
  • Unit tests, lint and supply-chain scripts for both apps: pass, except ReflowStyleTest > line height flows from settings in the phone app, which this change doesn't touch.
  • Emulator, against silo-server e6df1d8ed: before, the error above on phone and TV; after, the 16-bit WAV book plays twice on phone (direct play, audio/raw in Media3) and twice on Android TV. A raw ADTS AAC book still direct-plays. Only 16-bit WAV was tested; the other PCM layouts are advertised because Media3's WAV extractor handles them.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-android/pr-707/

Surface and build: Android phone (Android 16) and Android TV (Android 14), the WAV audiobook's player; before on origin/main e9c410096, after on this branch; same synthetic file. Tablet uses the phone app and wasn't captured separately.

Risks

A device without an audio/raw decoder advertises nothing new.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (T3 Code)
  • Tool(s): Claude Code, Codex CLI, GitHub CLI, Gradle, Android Emulator, adb
  • Model(s): claude-opus-5-5; gpt-6.1-sol (review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: Independent Claude Opus 5.5 and GPT 6.1 Sol reviews of the branch diff (correctness, repo standards, the bug as described). Neither found anything.

Note

Advertise PCM codecs for audio/raw in PlaybackCapabilityDetector

Adds PCM_CODEC_NAMES and platformAudioCodecNames so audio/raw maps to five PCM wire codec names instead of a single codec. The probe method now records one PlatformAudioDecodeCapability per mapped codec, so WAV audiobooks advertise PCM decoding. Tests cover PCM, AAC, and unknown-MIME mappings.

Macroscope summarized 47643a3.

A WAV audiobook's track is PCM (pcm_s16le in the server's ffmpeg naming).
The server's audio-only planner direct-plays only a codec the client lists,
and this client never listed any PCM codec, while its progressive delivery
is disabled. WAV therefore had no route at all and failed with "No validated
playback route is available for this audio source."

The platform audio probe now maps the raw (audio/raw) decoder Media3 plays
WAV through to the integer and float PCM codec names, so the server picks
direct play for WAV the same way it does for MP3, FLAC and AAC.
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Oct 27, 2026
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2592ed5a-1129-4a74-9c0c-82d97c49b20d
Commits

Reviewing files that changed from the base of the PR and between 548617c and 47643a3.

Files selected for processing: 2
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackCapabilityDetector.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/PlaybackCapabilityDetectorAudioSupportTest.kt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@silo-kody

silo-kody Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Oct 27, 2026

Copy link
Copy Markdown

PCM/WAV playback becomes available (and PCM tracks in other listed containers may direct-play). The Evidence link covers the phone and Android TV, but lacks the Android tablet and foldable in both folded and open states; the shared android-shared detector reaches those devices, so the tablet note does not show that it is unaffected. Please add before-and-after playback captures for the same media on the tablet and on the foldable folded and open, preferably recordings to show playback.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@silo-triage silo-triage Bot added bug Something isn't working impact: playback Can't play, stalls, or wrong media priority: P2 Limited scope, workaround exists, or polish labels Oct 27, 2026
@Rhainland

Copy link
Copy Markdown
Contributor Author

Not adding tablet/foldable recordings. The change is in the shared playback-capability detector, and no layout changes. The tablet and foldable run the same phone player build, so their playback path is the phone path shown on the evidence page.

@Quick104
Quick104 merged commit fe3d9c8 into Silo-Server:main Nov 16, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: playback Can't play, stalls, or wrong media priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants