fix(audio): HOS_AUDIO_MUTE silences the samples, not the device's volume #3225

Merged
HumanBean merged 2 commits from ChloeNow/Longshot:fix/audio-mute-samples into main 2026-12-05 18:11:28 +00:00
Member

Summary

The bug: once you have run the game tests on a build, every later normal launch of that same
longshot-game.exe plays no sound. The log of the silent launch still shows real output
(audio: ... loudest sample 9007 of 32767): nothing in the game says why.

The cause: HOS_AUDIO_MUTE=1 is set by every game-test run (modtool's game_test.rs,
scripts/devtools/gametests.py, scripts/devtools/ab.py). host/nn_audio.c's au_opened() muted the run with
waveOutSetVolume(w, 0) (783c43100). Windows keeps that volume as the program's audio session volume and gives it
back at the program's next start, so the mute meant for one test run stayed on every later launch of the exe (measured
below: the session volume of main's game-tested build is 0.00 on a normal launch).

How to see it on main (reproduced 2026-12-04 on Windows 11, RTX 4060 Laptop, a build of main's nn_audio.c):

  1. Launch a build normally whose exe is at full volume: sound.
  2. Run dev.py game-tests <mod> --runtime <that game folder> on it (its log lists the switch HOS_AUDIO_MUTE=1).
  3. Launch the same build normally again (no HOS_AUDIO switch in its log): no sound, though its log reports a
    non-zero loudest sample.

The fix: HOS_AUDIO_MUTE=1 keeps the device opened and fed as for a player, and output_frame writes silence
into the blocks it hands the device instead of the game's frame. The device's volume is never set anywhere, so a
normal launch keeps the player's own volume; nothing forces it to full. HOS_AUDIO_DUMP and the log's
loudest sample still hold what the game sent, as before, so a test run can still check that the game made sound.
au_opened() is gone (setting the volume was all it did). The mute now also works on Linux, where the old call was
Windows-only.

A build already silenced stays silent after this fix until one launch sets its waveOut volume back to full
(waveOutSetVolume(w, 0xFFFFFFFF)): this change stops making new silent builds but does not reset an exe's stored
volume, since doing that on every normal launch would override the player's own setting. Windows keeps the volume per
exe path: a fresh game folder starts at full volume, while a game folder rebuilt in place (dev.py update, dev.py game) most likely keeps its 0 (not tested). If reviewers want those healed too, a test run could set the volume to
full when it opens the device (still silent, since it feeds silence); it is left out here so that no launch changes
the volume at all.

Read first: host/nn_audio.c output_frame (the block write), tests/audio_output_errors_test.c (the mute case).

Testing

Tested: Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU. Built and run on main @ f359e2621 plus this change;
rebased onto 3a0f7d8f7 (one commit, no audio file), where the three audio output and volume checks pass again.

  • tests/test_audio_output_errors.py (the real output section compiled with device spies) gets a mute case:
    with HOS_AUDIO_MUTE=1 the device opens once, is fed 20 blocks over 40 frames as in the normal case, every block
    it is given is silent, and the 10-second log line still reports a non-zero loudest sample. Fails on main @
    f359e2621 with the test commit alone (FAIL mute: blocks[b][i] == 0: the blocks carry the game's samples), passes
    here. With the fix's memset line undone it fails again. All 32 cases pass with clang (llvm-mingw); mute with
    llvm-mingw's gcc driver too.
  • tests/test_audio_output_devices.py: its order check (the channel guard before the copy into the blocks) now finds
    the block write by its new text; passes.
  • The other checks that read host/nn_audio.c (audio_aux, biquad, deadline, in, mono, output_menu,
    output_recovery, speaker_layout, voice_biquad, volume, wave_buffer_release, hle_guest_ranges, host_guest_writes,
    microphone_test_gain, pad_speaker, pause_background) pass. test_pipeline_tour.py fails the same way on a clean
    origin/main tree (the tour's run is not given --vk-profile): not this change.
  • In game, this branch's game folder (dev.py game, shaders prepared with longshot-builder dev prepare), the bug's
    steps 2 and 3:
    • A game-test run (dev.py game-tests docs/modding/examples/first-mod, kokiri-start, headless): its log lists
      HOS_AUDIO_MUTE=1; the device opened as a player's (audio: output on the default device (3 devices), stereo) and
      was fed (1000 blocks played in the first 10 s). (That example's tests are fake-game ones and error in the real
      game, FakeOnlyError, as they do on main: the run served only as a muted test run.)
    • Then a normal launch of the same longshot-game.exe (longshot_ctl.py launch, windowed, through the queue): no
      HOS_AUDIO switch in its log; audio: output on the default device (3 devices), stereo, 1000 blocks played in the first 10 s, loudest sample 255 of 32767.
  • Before and after, measured and heard (2026-12-04, the same PC, one normal launch each, ~45 s from kokiri-start,
    Windows' audio session of longshot-game read every second through Core Audio: ISimpleAudioVolume,
    IChannelAudioVolume, the session's peak meter):
    • this branch's build, after its game-test run: session volume 1.00, channel volumes 1.00 1.00 throughout,
      meter up to 0.145. Sound, heard.
    • main's build (longshot-rs-2783-play, game-tested before): session volume 0.00, channel volumes
      0.00 0.00 throughout, though the game played (meter up to 0.211, which is measured before the session's
      volume; its log: 1001 blocks played in the first 10 s, loudest sample 10201). No sound, heard.

Still to test:

  • Linux, by hand (a Linux reviewer): a dev.py game-tests run with speakers on, expecting silence (the mute now works
    there too; before, au_opened muted only on Windows), then a normal launch of the same build, expecting sound.

Measurements

Verdict: fixed: after a game-test run, a normal launch is at full volume and audible (main: volume 0, silent).
No performance cost to measure: one memset in place of one memcpy per frame, only in test runs; a player's frame is
copied as before.

Setup: Windows 11, RTX 4060 Laptop; one game-test run on each build, then one normal windowed launch of the same exe
from kokiri-start, ~45 s; Windows' audio session for longshot-game read every second through Core Audio
(ISimpleAudioVolume, IChannelAudioVolume). The "before" build is a local build on main @ 46ae5b43d whose
host/nn_audio.c is main's (no diff to f359e2621). The numbers hold on main @ 3a0f7d8f7, this PR's base: no commit
between 46ae5b43d and it changes host/nn_audio.c or the game tests' switches.

Before: main @ 46ae5b43d After: this PR @ 71d5aba5d (6cc9ec01f after the rebase)
Session volume of a normal launch after a game-test run 0.00 (channels 0.00 0.00) 1.00 (channels 1.00 1.00)
Heard nothing the game's sound

Risks

Only runs with HOS_AUDIO_MUTE=1 change (test runs, ab.py). They still open and feed the device and log the same
lines; what the speakers get is silence instead of sound at volume 0. A revert is enough. Players notice nothing,
except that a build stops going silent after a test run on it. Builds silenced before this change need one launch that
sets the waveOut volume back to full (see Summary). #3116 (the sound out of the game's process, WIP) moves this output
code; whichever lands second keeps the mute in the samples.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). (Windows, tests/run_all.py: 16 checks
    fail identically on main @ f359e2621 and here, none audio: test_dlssg, test_game_features, test_helpers_extract,
    test_longshot_builder, test_no_game_title, test_no_map_reload, test_present_acquire_ahead,
    test_present_geometry_trace, test_present_held_image, test_present_image_free, test_run_all_junit, test_seed_reader,
    test_sync_watch_event, test_turf_budget, test_ui_renderer, test_utf8_paths. Everything else passes.)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows: dev.py game built it, llvm-mingw. Linux: no Linux PC here; CI's game-free checks compile and run the changed output section on Linux with -Werror (test_audio_output_errors, test_linux_audio_output): ticked once they pass)
  • Docs updated (docs/dev/reference/switches.md, HOS_AUDIO_MUTE; the switch list at the top of nn_audio.c).
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary **The bug:** once you have run the game tests on a build, every later normal launch of that same `longshot-game.exe` plays no sound. The log of the silent launch still shows real output (`audio: ... loudest sample 9007 of 32767`): nothing in the game says why. **The cause:** `HOS_AUDIO_MUTE=1` is set by every game-test run (`modtool`'s `game_test.rs`, `scripts/devtools/gametests.py`, `scripts/devtools/ab.py`). `host/nn_audio.c`'s `au_opened()` muted the run with `waveOutSetVolume(w, 0)` (783c43100). Windows keeps that volume as the program's audio session volume and gives it back at the program's next start, so the mute meant for one test run stayed on every later launch of the exe (measured below: the session volume of main's game-tested build is 0.00 on a normal launch). **How to see it on main** (reproduced 2026-12-04 on Windows 11, RTX 4060 Laptop, a build of main's `nn_audio.c`): 1. Launch a build normally whose exe is at full volume: sound. 2. Run `dev.py game-tests <mod> --runtime <that game folder>` on it (its log lists the switch `HOS_AUDIO_MUTE=1`). 3. Launch the same build normally again (no `HOS_AUDIO` switch in its log): no sound, though its log reports a non-zero loudest sample. **The fix:** `HOS_AUDIO_MUTE=1` keeps the device opened and fed as for a player, and `output_frame` writes silence into the blocks it hands the device instead of the game's frame. The device's volume is never set anywhere, so a normal launch keeps the player's own volume; nothing forces it to full. `HOS_AUDIO_DUMP` and the log's `loudest sample` still hold what the game sent, as before, so a test run can still check that the game made sound. `au_opened()` is gone (setting the volume was all it did). The mute now also works on Linux, where the old call was Windows-only. **A build already silenced stays silent** after this fix until one launch sets its waveOut volume back to full (`waveOutSetVolume(w, 0xFFFFFFFF)`): this change stops making new silent builds but does not reset an exe's stored volume, since doing that on every normal launch would override the player's own setting. Windows keeps the volume per exe path: a fresh game folder starts at full volume, while a game folder rebuilt in place (`dev.py update`, `dev.py game`) most likely keeps its 0 (not tested). If reviewers want those healed too, a test run could set the volume to full when it opens the device (still silent, since it feeds silence); it is left out here so that no launch changes the volume at all. Read first: `host/nn_audio.c` `output_frame` (the block write), `tests/audio_output_errors_test.c` (the `mute` case). ## Testing **Tested:** Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU. Built and run on `main` @ f359e2621 plus this change; rebased onto 3a0f7d8f7 (one commit, no audio file), where the three audio output and volume checks pass again. - `tests/test_audio_output_errors.py` (the real output section compiled with device spies) gets a `mute` case: with `HOS_AUDIO_MUTE=1` the device opens once, is fed 20 blocks over 40 frames as in the `normal` case, every block it is given is silent, and the 10-second log line still reports a non-zero loudest sample. **Fails on main** @ f359e2621 with the test commit alone (`FAIL mute: blocks[b][i] == 0`: the blocks carry the game's samples), passes here. With the fix's `memset` line undone it fails again. All 32 cases pass with clang (llvm-mingw); `mute` with llvm-mingw's gcc driver too. - `tests/test_audio_output_devices.py`: its order check (the channel guard before the copy into the blocks) now finds the block write by its new text; passes. - The other checks that read `host/nn_audio.c` (audio_aux, biquad, deadline, in, mono, output_menu, output_recovery, speaker_layout, voice_biquad, volume, wave_buffer_release, hle_guest_ranges, host_guest_writes, microphone_test_gain, pad_speaker, pause_background) pass. `test_pipeline_tour.py` fails the same way on a clean `origin/main` tree (`the tour's run is not given --vk-profile`): not this change. - In game, this branch's game folder (`dev.py game`, shaders prepared with `longshot-builder dev prepare`), the bug's steps 2 and 3: - **A game-test run** (`dev.py game-tests docs/modding/examples/first-mod`, kokiri-start, headless): its log lists `HOS_AUDIO_MUTE=1`; the device opened as a player's (`audio: output on the default device (3 devices), stereo`) and was fed (`1000 blocks played in the first 10 s`). (That example's tests are fake-game ones and error in the real game, `FakeOnlyError`, as they do on main: the run served only as a muted test run.) - **Then a normal launch of the same `longshot-game.exe`** (`longshot_ctl.py launch`, windowed, through the queue): no `HOS_AUDIO` switch in its log; `audio: output on the default device (3 devices), stereo`, `1000 blocks played in the first 10 s, loudest sample 255 of 32767`. - **Before and after, measured and heard** (2026-12-04, the same PC, one normal launch each, ~45 s from kokiri-start, Windows' audio session of `longshot-game` read every second through Core Audio: `ISimpleAudioVolume`, `IChannelAudioVolume`, the session's peak meter): - this branch's build, after its game-test run: session volume **1.00**, channel volumes **1.00 1.00** throughout, meter up to 0.145. **Sound, heard.** - main's build (`longshot-rs-2783-play`, game-tested before): session volume **0.00**, channel volumes **0.00 0.00** throughout, though the game played (meter up to 0.211, which is measured before the session's volume; its log: `1001 blocks played in the first 10 s, loudest sample 10201`). **No sound, heard.** **Still to test:** - Linux, by hand (a Linux reviewer): a `dev.py game-tests` run with speakers on, expecting silence (the mute now works there too; before, `au_opened` muted only on Windows), then a normal launch of the same build, expecting sound. ## Measurements **Verdict:** fixed: after a game-test run, a normal launch is at full volume and audible (main: volume 0, silent). No performance cost to measure: one `memset` in place of one `memcpy` per frame, only in test runs; a player's frame is copied as before. Setup: Windows 11, RTX 4060 Laptop; one game-test run on each build, then one normal windowed launch of the same exe from kokiri-start, ~45 s; Windows' audio session for `longshot-game` read every second through Core Audio (`ISimpleAudioVolume`, `IChannelAudioVolume`). The "before" build is a local build on main @ 46ae5b43d whose `host/nn_audio.c` is main's (no diff to f359e2621). The numbers hold on main @ 3a0f7d8f7, this PR's base: no commit between 46ae5b43d and it changes `host/nn_audio.c` or the game tests' switches. | | Before: main @ 46ae5b43d | After: this PR @ 71d5aba5d (6cc9ec01f after the rebase) | |---|---|---| | Session volume of a normal launch after a game-test run | 0.00 (channels 0.00 0.00) | 1.00 (channels 1.00 1.00) | | Heard | nothing | the game's sound | ## Risks Only runs with `HOS_AUDIO_MUTE=1` change (test runs, `ab.py`). They still open and feed the device and log the same lines; what the speakers get is silence instead of sound at volume 0. A revert is enough. Players notice nothing, except that a build stops going silent after a test run on it. Builds silenced before this change need one launch that sets the waveOut volume back to full (see Summary). #3116 (the sound out of the game's process, WIP) moves this output code; whichever lands second keeps the mute in the samples. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). (Windows, `tests/run_all.py`: 16 checks fail identically on `main` @ f359e2621 and here, none audio: test_dlssg, test_game_features, test_helpers_extract, test_longshot_builder, test_no_game_title, test_no_map_reload, test_present_acquire_ahead, test_present_geometry_trace, test_present_held_image, test_present_image_free, test_run_all_junit, test_seed_reader, test_sync_watch_event, test_turf_budget, test_ui_renderer, test_utf8_paths. Everything else passes.) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows: `dev.py game` built it, llvm-mingw. Linux: no Linux PC here; CI's game-free checks compile and run the changed output section on Linux with `-Werror` (test_audio_output_errors, test_linux_audio_output): ticked once they pass) - [x] Docs updated (`docs/dev/reference/switches.md`, `HOS_AUDIO_MUTE`; the switch list at the top of `nn_audio.c`). - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The output ring's fixture gets a "mute" case: with HOS_AUDIO_MUTE=1 the device is
opened and fed as for a player, every block it is given holds silence, and the log
still reports the loudest sample the game sent. It fails on main, where the switch
sets the waveOut volume instead and the blocks carry the game's sound.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(audio): HOS_AUDIO_MUTE silences the samples, not the device's volume
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 6s
6cc9ec01fa
HOS_AUDIO_MUTE=1, which every game-test run sets (modtool's game_test, dev.py
game-tests, ab.py), called waveOutSetVolume(w, 0). Windows keeps that volume for
the program, the Volume mixer does not show it, and every later normal launch of
the same longshot-game.exe was silent though its log showed real output.

The switch now keeps the device opened and fed as for a player and writes silence
into the blocks it is given. The device's volume is never set, so a normal launch
keeps the player's own. HOS_AUDIO_DUMP and the log's loudest sample still hold
what the game sent. The mute now also works on Linux, where the old call was
Windows-only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU. This branch's game folder: a dev.py game-tests run (HOS_AUDIO_MUTE=1 in its log; the device opened and fed, 1000 blocks in the first 10 s), then a normal windowed launch of the same longshot-game.exe from kokiri-start: Windows' audio session for it at volume 1.00 (channels 1.00 1.00) throughout, the game's sound heard. main's game-tested build launched the same way: session volume 0.00 (channels 0.00 0.00), nothing heard, though its log reports a loudest sample of 10201.

Tested in game: Windows 11, NVIDIA GeForce RTX 4060 Laptop GPU. This branch's game folder: a dev.py game-tests run (HOS_AUDIO_MUTE=1 in its log; the device opened and fed, 1000 blocks in the first 10 s), then a normal windowed launch of the same longshot-game.exe from kokiri-start: Windows' audio session for it at volume 1.00 (channels 1.00 1.00) throughout, the game's sound heard. main's game-tested build launched the same way: session volume 0.00 (channels 0.00 0.00), nothing heard, though its log reports a loudest sample of 10201.
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The Windows test shows that a game-test run no longer silences the next launch. Linux playback still needs an in-game check, and the pull request remains WIP with CI running. Recommend approval; not approved on the forge.

The mute switch now feeds silent samples to the output device instead of changing its persistent Windows volume. The game’s samples remain available to the dump and diagnostic log; builds already silenced by an earlier test run remain silent.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L1 host/nn_audio.c:1319: The new Linux mute behavior has not yet been checked with a real output device. (more on the line) Do: On Linux, run a game test with speakers enabled, then launch the same build normally and check that the first run is silent and the second has sound.

Checks: Still running: 10 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes on the tested Windows setup: after a game-test run, the reported session volume was 1.00 and sound was heard, versus 0.00 and silence on main. The author reports that the game-free mute test fails with the key memset undone. Linux behavior remains unverified in game.

Other systems: The changed output path runs on Windows and Linux, including stereo and 5.1 output and device recovery. The synthetic output test covers device behavior on the reported Windows run; a Linux in-game run is still needed. Controller-speaker output has a separate path. Previously silenced Windows builds are not healed by this change.

Switches: HOS_AUDIO_MUTE remains off by default. When enabled, it now sends silent samples instead of setting the Windows device volume, and also mutes the main output on Linux. The switch reference and source comment are updated; leaving normal launches at the player’s existing volume is appropriate.

Reviewed: 6cc9ec01fa against 3a0f7d8f7f: Read the repository rules, pull request template, diff, commits, changed output code and its mixer and device paths, and the changed test fixture and runner. Skimmed the rest of the large audio source, switch reference and standards; Tooling’s adjacent AGENTS.md and docs/review-checklist.md were unavailable. No generated files or recorded runs were changed.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance.
  • The mute fixture supplies synthetic samples and checks the changed line’s behavior.
  • The output buffer write uses the existing guarded channel count and block dimensions.
  • The new cached mute value is used by the mixer’s output path.

Testing: No code or tests were run during review. The author reports Windows game and game-free checks; the listed CI checks are still running.

Overlaps and merge order: The description identifies WIP pull request #3116 as moving this output code; whichever merges second must preserve the sample mute.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The Windows test shows that a game-test run no longer silences the next launch. Linux playback still needs an in-game check, and the pull request remains WIP with CI running. Recommend approval; not approved on the forge. The mute switch now feeds silent samples to the output device instead of changing its persistent Windows volume. The game’s samples remain available to the dump and diagnostic log; builds already silenced by an earlier test run remain silent. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `host/nn_audio.c:1319`: The new Linux mute behavior has not yet been checked with a real output device. (more on the line) **Do:** On Linux, run a game test with speakers enabled, then launch the same build normally and check that the first run is silent and the second has sound. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes on the tested Windows setup: after a game-test run, the reported session volume was 1.00 and sound was heard, versus 0.00 and silence on main. The author reports that the game-free mute test fails with the key memset undone. Linux behavior remains unverified in game. **Other systems:** The changed output path runs on Windows and Linux, including stereo and 5.1 output and device recovery. The synthetic output test covers device behavior on the reported Windows run; a Linux in-game run is still needed. Controller-speaker output has a separate path. Previously silenced Windows builds are not healed by this change. **Switches:** HOS_AUDIO_MUTE remains off by default. When enabled, it now sends silent samples instead of setting the Windows device volume, and also mutes the main output on Linux. The switch reference and source comment are updated; leaving normal launches at the player’s existing volume is appropriate. **Reviewed:** 6cc9ec01fa65 against 3a0f7d8f7f34: Read the repository rules, pull request template, diff, commits, changed output code and its mixer and device paths, and the changed test fixture and runner. Skimmed the rest of the large audio source, switch reference and standards; Tooling’s adjacent AGENTS.md and docs/review-checklist.md were unavailable. No generated files or recorded runs were changed.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance. - The mute fixture supplies synthetic samples and checks the changed line’s behavior. - The output buffer write uses the existing guarded channel count and block dimensions. - The new cached mute value is used by the mixer’s output path. **Testing:** No code or tests were run during review. The author reports Windows game and game-free checks; the listed CI checks are still running. **Overlaps and merge order:** The description identifies WIP pull request #3116 as moving this output code; whichever merges second must preserve the sample mute. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -1323,0 +1316,4 @@
say what the game sent. tests/test_audio_output_errors.py */
static int mute = -1;
if (mute < 0) mute = env_on("HOS_AUDIO_MUTE");
int16_t *block = blocks[fill_block] + fill_frames * FRAME * out_channels;
Member

L1 (should fix): The new Linux mute behavior has not yet been checked with a real output device.

When: On Linux, a game-test run now sends zeroed samples through SDL; the reported checks use device spies and do not show whether an actual device stays silent and a subsequent normal launch is audible.

Do: On Linux, run a game test with speakers enabled, then launch the same build normally and check that the first run is silent and the second has sound.

**L1** (should fix): The new Linux mute behavior has not yet been checked with a real output device. *When:* On Linux, a game-test run now sends zeroed samples through SDL; the reported checks use device spies and do not show whether an actual device stays silent and a subsequent normal launch is audible. **Do:** On Linux, run a game test with speakers enabled, then launch the same build normally and check that the first run is silent and the second has sound.
HumanBean changed title from WIP: fix(audio): HOS_AUDIO_MUTE silences the samples, not the device's volume to fix(audio): HOS_AUDIO_MUTE silences the samples, not the device's volume 2026-12-05 18:11:24 +00:00
HumanBean deleted branch fix/audio-mute-samples 2026-12-05 18:11:29 +00:00
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 6s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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!3225
No description provided.