Skip to content

feat(player): Windows HDMI audio bitstream passthrough - #435

Open
umarjamilpc wants to merge 2 commits into
NuvioMedia:Devfrom
umarjamilpc:feature/windows-hdmi-passthrough
Open

umarjamilpc wants to merge 2 commits into
NuvioMedia:Devfrom
umarjamilpc:feature/windows-hdmi-passthrough

Conversation

@umarjamilpc

Copy link
Copy Markdown

Summary

Adds an opt-in Windows-only HDMI audio passthrough setting so Dolby/DTS bitstreams (including Atmos / DTS:X where the receiver supports them) can be sent unchanged over the Windows default HDMI endpoint via WASAPI exclusive + libmpv audio-spdif. Default remains decoded PCM for speakers/headphones.

Rebased onto current Dev (0ce22855). One conflict resolved in PlayerEngine.desktop.kt (kept new initialPositionMs / initialPositionRequestKey keys and added windowsHdmiPassthroughEnabled).

PR type

  • Reproducible bug fix
  • UI glitch/bug fix
  • Behavior bug/regression fix
  • Small maintenance only, with no UI or behavior change
  • Docs accuracy fix
  • Translation/localization only
  • Approved larger or directional change

Why

Windows desktop currently always decodes to PCM, so AV receivers (e.g. Denon) see stereo/PCM instead of Dolby Atmos / DTS:X even when other Windows players bitstream correctly on the same HDMI path.

Feature request: #250 (open, labeled enhancement; filed for maintainer review/approval per CONTRIBUTING).

Desktop scope

  • Windows x64: settings toggle + native WASAPI exclusive / audio-spdif path
  • Shared settings storage/repository + Playback Settings UI (Windows-gated)
  • macOS: JNI create signature parity only (unused bool)
  • Android/iOS: expect/actual stubs only (no behavior)

Issue or approval

Feature request: #250

UI / behavior impact

  • No UI change
  • No behavior change
  • UI changed only to fix a documented glitch/bug
  • Behavior changed only to fix a documented bug/regression
  • UI change has explicit maintainer approval
  • Behavior change has explicit maintainer approval

Policy check

  • I have read and understood CONTRIBUTING.md.
  • This PR is small, focused, and limited to one problem.
  • This PR is scoped to the desktop app, desktop packaging, desktop documentation, or shared code required for desktop behavior.
  • This PR is not cosmetic-only.
  • Any UI change fixes a linked glitch/bug and includes visual proof, or this PR has no UI change.
  • Any behavior change fixes a linked bug/regression or has explicit approval, or this PR has no behavior change.
  • This PR does not bundle unrelated refactors, cleanups, formatting, or drive-by changes.
  • This PR does not add dependencies, architecture changes, migrations, or product-direction changes without explicit approval.
  • I listed the testing performed below.

Note: #250 is the linked feature request. Maintainer approval on that issue is still pending; opening this PR so the author can review the ready implementation against current Dev.

Scope boundaries

Intentionally not included:

  • In-app HDMI device picker
  • TorrServer / installer / login config changes
  • Non-Windows platforms enabling passthrough

Testing

  • Manual Windows x64 testing of the HDMI passthrough path against a Denon HDMI receiver (bitstream engages when toggle on; PCM when off) on the earlier implementation branch
  • Rebased onto latest Dev with conflict resolution only in PlayerEngine.desktop.kt; no app rebuild in this update pass
  • Verified native JNI signature parity (Windows + macOS create) and settings expect/actual stubs after rebase

Screenshots / Video

UI addition is a Windows-only Playback Settings switch (not a glitch fix). Happy to attach a settings screenshot on request.

Breaking changes

None when the toggle is left off (default). When enabled, software volume/speed are skipped while bitstreaming (receiver controls volume).

Linked issues

#250

Allow optional WASAPI exclusive SPDIF passthrough for Dolby/DTS
formats on Windows when connected to an AV receiver, with decoded
PCM fallback when the toggle is off.
Resolve NativePlayerController create-path conflict with Dev's
createWorker/nativeCreate lifecycle, keep HDMI passthrough arg, and
update Linux JNI create signature plus teardown tests for parity.
@KhooLy

KhooLy commented Sep 3, 2026

Copy link
Copy Markdown
Member

Looks good overall, but volume/speed are currently disabled whenever the setting is enabled, even if mpv falls back to decoded PCM. Please only disable them while passthrough is actually active, and rebase/test this against current Dev.

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.

2 participants