feat(audio): support Linux playback output selection #1205

Merged
HumanBean merged 2 commits from Phishinabowl/Longshot:feat/linux-audio-output-selector into main 2026-11-16 18:28:23 +00:00
Member

Type: feat · Risk: medium · Tested on: Windows 10 / RTX 3080, Ubuntu 26.04.1 / RTX 5090 Laptop (SDL2, PulseAudio through PipeWire) · Needs: current-main refresh, feature measurements, screenshots/guide review, Linux SDL3 and physical output hotplug coverage

Why

The output-device selector introduced in #1001 can select Windows playback endpoints, but Linux only offers the system default. Linux discovery returns an empty list, the POSIX playback shim ignores its device argument, and SDL always opens Default.

This completes named output selection on Linux using the SDL library already loaded by the game. Prior-work search for "Linux playback" found no matching pull request or issue; #1001 is the related merged selector implementation.

What changed

Linux can choose a named playback output, temporarily fall back to Default when it disappears, and return to the preferred output when it reappears. Existing pre-mix switching and channel-layout recovery remain in place.

  • host/hos_sdl.c, host/hos_sdl.h: enumerate SDL2/SDL3 playback devices, resolve backend-qualified names to process-local tokens, open the requested endpoint, query its channels and detect disappearance. Tokens are never persisted or reused for a different identity. Renamed devices are missing; ambiguous duplicate names are omitted rather than choosing the wrong output.
  • host/audio_output_devices.c: supply Linux metadata and resolution through the existing locked preference mailbox and host callbacks. Discovery does not open a stream.
  • host/posix/win32_posix.c: own the SDL playback handle, report a removed output to the existing recovery path, and stop callbacks before releasing queue/userdata/mutex state. A failed SDL3 resume destroys its stream.
  • gpu/vk/vk_menu.cpp, gpu/vk/menu_i18n.h, README.md: replace the Windows-only Linux help text, translate the system-default explanation in all 13 menu languages, and document Linux identity/duplicate-name limits.
  • Tests: production-source metadata/SDL2/SDL3/POSIX fixtures, including list reorder, selection, channels, PCM completion, removal/return, failed open/resume, duplicates and simultaneous fallback/probe handles. Adapt the existing SDL signature and localization fixtures. The selector's stale shader-stamp assertion now follows main's translator_files.stamp(vk) implementation.

Measurements

Verdict: the missing Linux enumeration is reproduced on main and corrected here; real Linux routing/fallback/return worked in the game. The required feature on/off FPS or frame-time comparison has not been measured, so this remains WIP. No zero-cost or performance claim is made.

Hardware: functional runtime checks used Windows 10 / RTX 3080 / NVIDIA 621.24 / Ryzen 9 5900XT / 64 GB and Ubuntu 26.04.1 / RTX 5090 Laptop / NVIDIA 595.99.02 / Core Ultra 9 275HX / 64 GB. The synthetic regression opens no hardware.
Scene: Audio overlay and actual playback during manual play-testing; no fixed scene/settings performance comparison has been run.
Method: production-source fixture return values on main versus this change, plus live audio-server link/state observations and owner-reported playback. These are functional results; no FPS/frame-time median is claimed.
How to reproduce: run the commands below, then select a named output in Audio; remove/reintroduce that endpoint while retaining the preferred selection and observe the fallback/return route.

Functional proof Before: main @ 1b2e7555 After: this PR @ fd9118d4
Linux metadata regression, two authored fake endpoints Compiles, then fails: returns 0 instead of 2 Passes: returns 2 with metadata and resolution
Named Linux playback Default only; device argument ignored Actual game stream linked to the selected virtual sink
Endpoint removal and return Named selection unavailable Analog fallback with preferred ID retained; automatic reattachment to the recreated named sink
Before: Linux playback count: 0 (expected 2)
        Assertion failed: count==2
After:  Linux playback count: 2 (expected 2)
        PASS Linux metadata bridge
        PASS SDL2: discovery, stable selection/reorder, channels, PCM, removal,
        default, return, failed open/resume, duplicates, callback-safe close
        PASS SDL3: discovery, stable selection/reorder, channels, PCM, removal,
        default, return, failed open/resume, duplicates, callback-safe close

Game-free reproduction: python -I -B tests/test_linux_audio_output.py --cc clang; run its --metadata-only --source ../main-checkout variant against main checked out at 1b2e7555 for the failing control. No device or game is opened by this fixture. Clang/GCC fake-SDL checks passed on Linux; llvm-mingw Clang checks passed on Windows.

Pending performance method: same PC, warmed save/scene/settings, at least two interleaved main/PR pairs with medians, including Default and named selection on the same real sink. Build and shader-preparation durations are not substituted for runtime measurements.

Flags and settings

No new environment switch or build flag. The existing output row and preference keys gain Linux behavior; the shipped choice remains Default.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
Audio → Output device Existing menu row Linux Default only Linux Default or named SDL output; Default remains shipped Briefly reopens playback before subsequent mixing Tested with SDL2/PulseAudio/PipeWire; real Linux SDL3 pending Default unless a particular output is wanted
audio_output_device_id Existing INI preference Windows endpoint ID; no Linux route Linux sdl:backend:device-name identity, not an enumeration index Remembers a missing endpoint and retries it Duplicate/renamed outputs cannot be identified as the former hardware device Let the menu write it
audio_output_device_name Existing INI display name Saved Windows label Saved Linux label too Shows the preferred output while unavailable Does not make a headphone port a separate endpoint Let the menu write it
HOS_AUDIO_DEVICE Existing per-run debug override, not a new switch Overrides the saved selector choice Keeps priority over the saved choice; Linux selected-channel query does not use a saved ID while forced Does not overwrite the saved preference Windows behavior retained; Linux numeric override cases were not separately qualified Leave unset for normal menu-controlled playback

Testing

Tested:

  • Built both host/renderer pairs at fd9118d4, using existing native tools: Windows llvm-mingw Clang 23.1.5; Linux Clang 23.1.6. Static module/hash/architecture/protection/export/direct-provider inspection passed. Required normal-cache shader preparation completed on both with no tagged preparation issues and isolated settings.
  • Windows 10, Ryzen 9 5900XT, 64 GB, RTX 3080, NVIDIA 621.24: owner passed named switching/Default, playback, Mono, mic controls, saves/settings in the Audio overlay. Normal close observed.
  • Ubuntu 26.04.1, Core Ultra 9 275HX, 64 GB, RTX 5090 Laptop, NVIDIA 595.99.02, Wayland, SDL2/PulseAudio/PipeWire: owner passed headphone playback, named analog/Default selection, Mono, mic controls and saves/settings. This was functional Audio-menu testing, not a fixed-scene performance run.
  • Linux originally exposed one sink. Independent SDL/server enumeration agreed; the headphone jack changes a port on that sink. A temporary non-persistent virtual sink supplied a second real server endpoint. Live PipeWire links confirmed the game's stream moved to it, fell back to analog on removal, retained the preferred ID with the overlay closed, and automatically returned when the same named sink reappeared under a different server object ID. Final removal restored analog. All temporary sinks were removed; system-default metadata remained unchanged.
  • Owner selected the real analog device and closed normally. A fresh process read that saved device and connected playback to analog. The temporary test output was not left as the saved choice.
  • Full game-free suites were run on the feature source before the upstream refresh; all failures were controlled against the same pinned main. Affected checks were then rerun after bringing in 1b2e7555, again with all failures controlled on that main:
Scope / base Windows passed / failed / skipped Linux passed / failed / skipped
Full suite, base 639e0652 plus the feature delta 611 / 29 / 43 645 / 21 / 17
Affected checks after main 1b2e7555 326 / 14 / 17 341 / 13 / 3

All selected audio, Mono, preference, recovery and localization checks passed. No topic-only failure was observed. These are not all-green suites; skips are not passes. Main controls reran each failing test name, not another full main suite. The tested authored delta was hash-verified on both PCs before committing it as fd9118d4.

Baseline failures common to both original full suites (all under tests/):

test_bug_report.py, test_bug_report_defaults.py, test_crt_options.py,
test_dlss_feature_size.py, test_failed_compile_keeps_objects.py,
test_fsr_uniform_ownership.py, test_guest_imported.py, test_hardware_report.py,
test_import_reach.py, test_linux_preflight.py, test_make_game_cache.py,
test_missing_nup.py, test_parallel_init_order.py, test_pending_guest_import.py,
test_replay_write_order.py, test_run_all_changed.py,
test_vk_occlusion_queries.py, test_walk_key.py

Windows-only baseline failures:

test_auto_handheld.py, test_crash_dialog.py, test_fastfp_fma.py, test_fpx_sticky.py,
test_job_queue.py, test_longshot_ctl.py, test_pads_after_menu.py, test_release.py,
test_spawn_emit.py, test_tested_configurations.py, test_work_lock.py

Linux-only baseline failures:

test_linux_update.py, test_mods_size_table.py, test_nonuniform_image_arrays.py

Updated-main affected failures are subsets of these sets: 14 Windows and 13 Linux, all reproduced on 1b2e7555. Diagnostic comparisons retain the originals: random control-session directory names and interleaved compiler warnings differ; Windows work-lock diagnostics were additionally qualified by a matching serial pair. test_bug_report.py and test_hardware_report.py encountered missing shared-Tooling routing in both topic/control environments; they are failures, not inferred passes. Unrelated fixture/compiler mismatches were not repaired here.

Not tested: real Linux SDL3 playback; physical USB/Bluetooth unplug/replug; Linux surround hardware, duplicate-name hardware and direct ALSA/other SDL audio drivers. Thread/callback synchronization is modeled by fixtures, not stress-tested. No controlled runtime performance comparison, before/after screenshots or canonical guide-image source review has been completed.

Must be tested:

  • Current main: refresh this branch and run the affected checks against the final base, expecting no topic-only failures (by hand: author). Main was 0cab3548 when this PR was prepared; the tested base remains 1b2e7555. The four new merges have no file overlap with this feature. No rebase/build was silently substituted for the tested revision.
  • Windows and Linux: complete the feature measurement pairs, screenshot/guide source review and committed test records, expecting quantified cost and accurate before/after UI evidence (by hand: author; keep the validated gameplay evidence separate from performance proof).
  • Linux SDL3, any GPU: select a named output, remove/reconnect it and restart, expecting Default fallback, retained preference, automatic return and persisted selection (by hand: contributor with SDL3 runtime).
  • Linux USB or Bluetooth audio, any GPU: repeat named-device selection, disconnect/reconnect and persistence on actual hardware, expecting audible routing and no crash (by hand: contributor with that hardware; virtual-sink results do not claim this driver coverage).

Risks

What could break: stream/callback lifetime on close or failed resume, backend-specific enumeration/hotplug behavior, and routing when names change or collide. SDL2 cannot distinguish identically named devices; ambiguous names are omitted. A missing preferred output uses Default and retries without overwriting the preference. A legacy Linux debug counter may still log (0 devices); it is not the new selector's SDL enumeration.

Turning it off: choose Default to stop requesting a named route; revert the implementation commit to restore the prior Linux path. Default still uses the new stream-lifetime handling, so it is not an off-switch for every changed line.

Compatibility: saves and existing speaker-layout/Mono values are unchanged. Existing INI keys remain; Linux identities are backend-qualified names. A preference copied from another backend/platform may be unavailable and fall back to Default. No MkwVkHost/MkwVkRenderer change or API-version bump, no shader source/translator-stamp change in this feature diff, and no new build tool/library dependency. Shader preparation during validation was required by unrelated upstream renderer changes relative to the older dev base, not by audio selection itself.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure. Functional proof is recorded; required feature on/off frame-time evidence is pending.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main. Tested base 1b2e7555; observed main 0cab3548 is four merges newer, with no feature-file overlap.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). Full/affected results and baseline failures are named above; final refreshed-revision suite qualification remains pending.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. Pending controlled feature-cost measurements.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. No new switch; existing Linux output behavior is documented in README, Default retained.
  • Screenshots of the same spot, captioned like the Measurements columns, for a change that shows on screen. Linux before/after Audio captures and guide-source review pending.
  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md). Public committed records pending; no private logs, host paths or game data will be committed.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated. README/translation updates are included; canonical guide-image source review remains pending.
**Type:** feat · **Risk:** medium · **Tested on:** Windows 10 / RTX 3080, Ubuntu 26.04.1 / RTX 5090 Laptop (SDL2, PulseAudio through PipeWire) · **Needs:** current-main refresh, feature measurements, screenshots/guide review, Linux SDL3 and physical output hotplug coverage ## Why The output-device selector introduced in #1001 can select Windows playback endpoints, but Linux only offers the system default. Linux discovery returns an empty list, the POSIX playback shim ignores its device argument, and SDL always opens Default. This completes named output selection on Linux using the SDL library already loaded by the game. Prior-work search for "Linux playback" found no matching pull request or issue; #1001 is the related merged selector implementation. ## What changed Linux can choose a named playback output, temporarily fall back to Default when it disappears, and return to the preferred output when it reappears. Existing pre-mix switching and channel-layout recovery remain in place. - `host/hos_sdl.c`, `host/hos_sdl.h`: enumerate SDL2/SDL3 playback devices, resolve backend-qualified names to process-local tokens, open the requested endpoint, query its channels and detect disappearance. Tokens are never persisted or reused for a different identity. Renamed devices are missing; ambiguous duplicate names are omitted rather than choosing the wrong output. - `host/audio_output_devices.c`: supply Linux metadata and resolution through the existing locked preference mailbox and host callbacks. Discovery does not open a stream. - `host/posix/win32_posix.c`: own the SDL playback handle, report a removed output to the existing recovery path, and stop callbacks before releasing queue/userdata/mutex state. A failed SDL3 resume destroys its stream. - `gpu/vk/vk_menu.cpp`, `gpu/vk/menu_i18n.h`, `README.md`: replace the Windows-only Linux help text, translate the system-default explanation in all 13 menu languages, and document Linux identity/duplicate-name limits. - Tests: production-source metadata/SDL2/SDL3/POSIX fixtures, including list reorder, selection, channels, PCM completion, removal/return, failed open/resume, duplicates and simultaneous fallback/probe handles. Adapt the existing SDL signature and localization fixtures. The selector's stale shader-stamp assertion now follows main's `translator_files.stamp(vk)` implementation. ## Measurements **Verdict:** the missing Linux enumeration is reproduced on main and corrected here; real Linux routing/fallback/return worked in the game. The required feature on/off FPS or frame-time comparison has **not** been measured, so this remains WIP. No zero-cost or performance claim is made. Hardware: functional runtime checks used Windows 10 / RTX 3080 / NVIDIA 621.24 / Ryzen 9 5900XT / 64 GB and Ubuntu 26.04.1 / RTX 5090 Laptop / NVIDIA 595.99.02 / Core Ultra 9 275HX / 64 GB. The synthetic regression opens no hardware. Scene: Audio overlay and actual playback during manual play-testing; no fixed scene/settings performance comparison has been run. Method: production-source fixture return values on main versus this change, plus live audio-server link/state observations and owner-reported playback. These are functional results; no FPS/frame-time median is claimed. How to reproduce: run the commands below, then select a named output in Audio; remove/reintroduce that endpoint while retaining the preferred selection and observe the fallback/return route. | Functional proof | Before: main @ 1b2e7555 | After: this PR @ fd9118d4 | |---|---|---| | Linux metadata regression, two authored fake endpoints | Compiles, then fails: returns 0 instead of 2 | Passes: returns 2 with metadata and resolution | | Named Linux playback | Default only; device argument ignored | Actual game stream linked to the selected virtual sink | | Endpoint removal and return | Named selection unavailable | Analog fallback with preferred ID retained; automatic reattachment to the recreated named sink | ```text Before: Linux playback count: 0 (expected 2) Assertion failed: count==2 After: Linux playback count: 2 (expected 2) PASS Linux metadata bridge PASS SDL2: discovery, stable selection/reorder, channels, PCM, removal, default, return, failed open/resume, duplicates, callback-safe close PASS SDL3: discovery, stable selection/reorder, channels, PCM, removal, default, return, failed open/resume, duplicates, callback-safe close ``` Game-free reproduction: `python -I -B tests/test_linux_audio_output.py --cc clang`; run its `--metadata-only --source ../main-checkout` variant against main checked out at `1b2e7555` for the failing control. No device or game is opened by this fixture. Clang/GCC fake-SDL checks passed on Linux; llvm-mingw Clang checks passed on Windows. Pending performance method: same PC, warmed save/scene/settings, at least two interleaved main/PR pairs with medians, including Default and named selection on the same real sink. Build and shader-preparation durations are not substituted for runtime measurements. ### Flags and settings No new environment switch or build flag. The existing output row and preference keys gain Linux behavior; the shipped choice remains Default. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | Audio → Output device | Existing menu row | Linux Default only | Linux Default or named SDL output; Default remains shipped | Briefly reopens playback before subsequent mixing | Tested with SDL2/PulseAudio/PipeWire; real Linux SDL3 pending | Default unless a particular output is wanted | | `audio_output_device_id` | Existing INI preference | Windows endpoint ID; no Linux route | Linux `sdl:backend:device-name` identity, not an enumeration index | Remembers a missing endpoint and retries it | Duplicate/renamed outputs cannot be identified as the former hardware device | Let the menu write it | | `audio_output_device_name` | Existing INI display name | Saved Windows label | Saved Linux label too | Shows the preferred output while unavailable | Does not make a headphone port a separate endpoint | Let the menu write it | | `HOS_AUDIO_DEVICE` | Existing per-run debug override, not a new switch | Overrides the saved selector choice | Keeps priority over the saved choice; Linux selected-channel query does not use a saved ID while forced | Does not overwrite the saved preference | Windows behavior retained; Linux numeric override cases were not separately qualified | Leave unset for normal menu-controlled playback | ## Testing **Tested:** - Built both host/renderer pairs at `fd9118d4`, using existing native tools: Windows llvm-mingw Clang 23.1.5; Linux Clang 23.1.6. Static module/hash/architecture/protection/export/direct-provider inspection passed. Required normal-cache shader preparation completed on both with no tagged preparation issues and isolated settings. - Windows 10, Ryzen 9 5900XT, 64 GB, RTX 3080, NVIDIA 621.24: owner passed named switching/Default, playback, Mono, mic controls, saves/settings in the Audio overlay. Normal close observed. - Ubuntu 26.04.1, Core Ultra 9 275HX, 64 GB, RTX 5090 Laptop, NVIDIA 595.99.02, Wayland, SDL2/PulseAudio/PipeWire: owner passed headphone playback, named analog/Default selection, Mono, mic controls and saves/settings. This was functional Audio-menu testing, not a fixed-scene performance run. - Linux originally exposed one sink. Independent SDL/server enumeration agreed; the headphone jack changes a port on that sink. A temporary non-persistent virtual sink supplied a second real server endpoint. Live PipeWire links confirmed the game's stream moved to it, fell back to analog on removal, retained the preferred ID with the overlay closed, and automatically returned when the same named sink reappeared under a different server object ID. Final removal restored analog. All temporary sinks were removed; system-default metadata remained unchanged. - Owner selected the real analog device and closed normally. A fresh process read that saved device and connected playback to analog. The temporary test output was not left as the saved choice. - Full game-free suites were run on the feature source before the upstream refresh; all failures were controlled against the same pinned main. Affected checks were then rerun after bringing in `1b2e7555`, again with all failures controlled on that main: | Scope / base | Windows passed / failed / skipped | Linux passed / failed / skipped | |---|---|---| | Full suite, base `639e0652` plus the feature delta | 611 / 29 / 43 | 645 / 21 / 17 | | Affected checks after main `1b2e7555` | 326 / 14 / 17 | 341 / 13 / 3 | All selected audio, Mono, preference, recovery and localization checks passed. No topic-only failure was observed. These are not all-green suites; skips are not passes. Main controls reran each failing test name, not another full main suite. The tested authored delta was hash-verified on both PCs before committing it as `fd9118d4`. Baseline failures common to both original full suites (all under `tests/`): ```text test_bug_report.py, test_bug_report_defaults.py, test_crt_options.py, test_dlss_feature_size.py, test_failed_compile_keeps_objects.py, test_fsr_uniform_ownership.py, test_guest_imported.py, test_hardware_report.py, test_import_reach.py, test_linux_preflight.py, test_make_game_cache.py, test_missing_nup.py, test_parallel_init_order.py, test_pending_guest_import.py, test_replay_write_order.py, test_run_all_changed.py, test_vk_occlusion_queries.py, test_walk_key.py ``` Windows-only baseline failures: ```text test_auto_handheld.py, test_crash_dialog.py, test_fastfp_fma.py, test_fpx_sticky.py, test_job_queue.py, test_longshot_ctl.py, test_pads_after_menu.py, test_release.py, test_spawn_emit.py, test_tested_configurations.py, test_work_lock.py ``` Linux-only baseline failures: ```text test_linux_update.py, test_mods_size_table.py, test_nonuniform_image_arrays.py ``` Updated-main affected failures are subsets of these sets: 14 Windows and 13 Linux, all reproduced on `1b2e7555`. Diagnostic comparisons retain the originals: random control-session directory names and interleaved compiler warnings differ; Windows work-lock diagnostics were additionally qualified by a matching serial pair. `test_bug_report.py` and `test_hardware_report.py` encountered missing shared-Tooling routing in both topic/control environments; they are failures, not inferred passes. Unrelated fixture/compiler mismatches were not repaired here. **Not tested:** real Linux SDL3 playback; physical USB/Bluetooth unplug/replug; Linux surround hardware, duplicate-name hardware and direct ALSA/other SDL audio drivers. Thread/callback synchronization is modeled by fixtures, not stress-tested. No controlled runtime performance comparison, before/after screenshots or canonical guide-image source review has been completed. **Must be tested:** - Current main: refresh this branch and run the affected checks against the final base, expecting no topic-only failures (by hand: author). Main was `0cab3548` when this PR was prepared; the tested base remains `1b2e7555`. The four new merges have no file overlap with this feature. No rebase/build was silently substituted for the tested revision. - Windows and Linux: complete the feature measurement pairs, screenshot/guide source review and committed test records, expecting quantified cost and accurate before/after UI evidence (by hand: author; keep the validated gameplay evidence separate from performance proof). - Linux SDL3, any GPU: select a named output, remove/reconnect it and restart, expecting Default fallback, retained preference, automatic return and persisted selection (by hand: contributor with SDL3 runtime). - Linux USB or Bluetooth audio, any GPU: repeat named-device selection, disconnect/reconnect and persistence on actual hardware, expecting audible routing and no crash (by hand: contributor with that hardware; virtual-sink results do not claim this driver coverage). ## Risks **What could break:** stream/callback lifetime on close or failed resume, backend-specific enumeration/hotplug behavior, and routing when names change or collide. SDL2 cannot distinguish identically named devices; ambiguous names are omitted. A missing preferred output uses Default and retries without overwriting the preference. A legacy Linux debug counter may still log `(0 devices)`; it is not the new selector's SDL enumeration. **Turning it off:** choose Default to stop requesting a named route; revert the implementation commit to restore the prior Linux path. Default still uses the new stream-lifetime handling, so it is not an off-switch for every changed line. **Compatibility:** saves and existing speaker-layout/Mono values are unchanged. Existing INI keys remain; Linux identities are backend-qualified names. A preference copied from another backend/platform may be unavailable and fall back to Default. No `MkwVkHost`/`MkwVkRenderer` change or API-version bump, no shader source/translator-stamp change in this feature diff, and no new build tool/library dependency. Shader preparation during validation was required by unrelated upstream renderer changes relative to the older dev base, not by audio selection itself. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [ ] Measurements has a verdict, or one line saying why there is nothing to measure. Functional proof is recorded; required feature on/off frame-time evidence is pending. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [ ] Rebased on current `main`. Tested base `1b2e7555`; observed main `0cab3548` is four merges newer, with no feature-file overlap. - [ ] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). Full/affected results and baseline failures are named above; final refreshed-revision suite qualification remains pending. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [ ] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. Pending controlled feature-cost measurements. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. No new switch; existing Linux output behavior is documented in README, Default retained. - [ ] Screenshots of the same spot, captioned like the Measurements columns, for a change that shows on screen. Linux before/after Audio captures and guide-source review pending. - [ ] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`). Public committed records pending; no private logs, host paths or game data will be committed. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. - [ ] Docs updated. README/translation updates are included; canonical guide-image source review remains pending.
Assisted-by: Codex
feat(audio): support Linux playback output selection
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 11s
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Website / Website on Cloudflare (pull_request_target) Has been skipped
Third-party parts / As their notes say (pull_request) Successful in 14s
PR description / Description follows the template (pull_request_target) Failing after 4s
fd9118d40c
Assisted-by: Codex
Author
Member

Tested in game: fd9118d4: Audio overlay/playback tested on Windows 10, RTX 3080, NVIDIA 621.24 and Ubuntu 26.04.1 Wayland, RTX 5090 Laptop, NVIDIA 595.99.02, SDL2/PulseAudio/PipeWire. Owner passed Windows switching/Default, playback, Mono, mic and saves/settings, and Linux analog/headphone/Default playback and controls. Live Linux stream links verified separate virtual-sink selection, removal fallback with preference retained, automatic return after recreation, and final analog fallback. Temporary sinks removed; system default unchanged. A normal-close/restart restored the real named analog output. Physical USB/Bluetooth and real Linux SDL3 remain untested; controlled performance and screenshots/guide review remain pending as listed in the WIP description.

Tested in game: fd9118d4: Audio overlay/playback tested on Windows 10, RTX 3080, NVIDIA 621.24 and Ubuntu 26.04.1 Wayland, RTX 5090 Laptop, NVIDIA 595.99.02, SDL2/PulseAudio/PipeWire. Owner passed Windows switching/Default, playback, Mono, mic and saves/settings, and Linux analog/headphone/Default playback and controls. Live Linux stream links verified separate virtual-sink selection, removal fallback with preference retained, automatic return after recreation, and final analog fallback. Temporary sinks removed; system default unchanged. A normal-close/restart restored the real named analog output. Physical USB/Bluetooth and real Linux SDL3 remain untested; controlled performance and screenshots/guide review remain pending as listed in the WIP description.
HumanBean changed title from WIP: feat(audio): support Linux playback output selection to feat(audio): support Linux playback output selection 2026-11-16 18:28:18 +00:00
HumanBean deleted branch feat/linux-audio-output-selector 2026-11-16 18:28:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1205
No description provided.