Repository navigation
feat: Audio tab in the Insert menu with Volume and Mute in background - #1270
Merged
Merged
Conversation
bvtterbroot
force-pushed
the
feat/audio-settings
branch
from
November 9, 2026 20:46
8c0cef4 to
5976ed6
Compare
Contributor
Author
|
Thanks for the careful review. All points are in 5976ed6 (the branch is also rebased on current main):
|
wyatt-poole
added a commit
to wyatt-poole/Hookshot
that referenced
this pull request
Nov 10, 2026
Conflicts in gpu/vk/vk_menu.cpp with main's Audio output row (NotRexed#1240) and the Restart/Quit confirm (NotRexed#1266, NotRexed#1255): tx_deadzone and tx_audio_output both kept; Esc on the Motion page goes back before the pending confirm is cancelled; the Motion row opens its page after the Cheats row's test in main's confirm chain. TAB_MOTION is now TAB_COUNT itself (one past the strip), and tab_selected is sized by it, so a tab added before TAB_COUNT (NotRexed#1270) moves the Motion page along instead of colliding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsKC8mjbyEUFAv6uy3SQiW
The Insert menu gets an Audio tab between Graphics and Gameplay: - Volume, 0 to 100% in steps of 5, on a squared curve (50% is -12 dB): the mixer scales each frame before the output, on every output channel, and ramps a change over one frame so it does not click. - Mute in background: silent while another window has the focus. A tool or no-activate window in front (Steam's or Discord's overlay, a toast, a tray flyout) counts as the game's only while the last normal window in front was the game's, as host/nn_hid.c's game_in_front decides it; the mixer keeps its own state. - Audio output (NotRexed#1240) moves here from the Gameplay tab. The host reads the two new rows through the renderer's option table every 100 ms (HOS_OPT_VOLUME 27, HOS_OPT_MUTE_BACKGROUND 28). Out of the box nothing changes: 100% and off. Without the Vulkan renderer's menu the game plays at full volume. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvtterbroot
force-pushed
the
feat/audio-settings
branch
from
November 10, 2026 18:04
5976ed6 to
df2d84c
Compare
Contributor
Author
|
Rebased onto the ImGui menu (#1459) and #1240. Thanks for the offer. Since #1459 replaced the menu, I redid the menu part on top of current main (
|
getzabelz
added a commit
to getzabelz/Hookshot
that referenced
this pull request
Nov 10, 2026
The Insert menu's Gameplay tab gets a Text size row (Original, 110%, 125%, 150%, 175%), under Text speed. It scales the text of dialogue, Navi and signs. nx2/oot_patches.py's letters' block of f_80b1e140 (a LetterAnimControl's step, already patched for Text speed) now also calls hos_oot_text_pane with the control (x19). host/oot_text_size.c scales the diagonal of the pane wrapper's 2D scale (+0x28, +0x38; 0.8 for dialogue) from the game's own value: never twice, again from the game's value whenever the game writes it, and back to it at Original. A field never scaled is not touched at Original. HOS_TEXT_SIZE=<0..4> stands over the menu, as HOS_TEXT_SPEED does. The option id is HOS_OPT_TEXT_SIZE (10). tests/test_rumble_menu.py's id table now reads one-name HOS_OPT_* enums too, so it still checks that no option id is answered twice. tests/test_audio_volume.py (NotRexed#1270) reads them the same way now. Tests: tests/test_text_size.py compiles host/oot_text_size.c against a fake guest memory (Original, each size, the game writing its value again, back to Original, missing control/wrapper/pane, more panes than the table keeps). tests/test_text_speed.py checks the hook gets x19. Played on Windows (this change applied to the v2.0.11 builder's source): dialogue and signs grow at each size and go back at Original; the choice is kept in hookshot_options.ini. Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Insert menu gets a fourth tab, Audio, between Graphics and Gameplay, with two rows:
host/nn_audio.c) scales each frame before the output, on every output channel (stereo or Mix for 5.1 when the default output has 5.1 speakers #1182's 5.1). A change ramps over one 5 ms frame, so it does not click. Gains stay at or below 1, so nothing clips. At 100% the frame is left alone.host/nn_hid.c'sgame_in_fronttreats Steam's or Discord's) still counts as the game's window.The host reads both through the renderer's option table every 100 ms, as new ids
HOS_OPT_VOLUME = 27andHOS_OPT_MUTE_BACKGROUND = 28(gpu/vk/vk_api.h; 18 to 22 are the motion rows, 24 to 26 DLSS). Without the Vulkan renderer's menu the game plays at full volume. Both are saved inhookshot_options.ini(volume=,mute_in_background=).menu_hit::tab_slot_wnow takes the tab count instead of assuming 3, so the tab strip and its clicks fit four tabs.Why
There was no way to set the game's volume apart from the Windows mixer, and no way to silence it while alt-tabbed. Both are common requests for a PC game.
#1240's Audio output row (Auto, Stereo, 5.1) would fit in this tab too. Whichever of the two lands second can move it here.
How it was tested
tests/test_audio_volume.pycompilesaudio_apply_gainfrom the source and checks the ramp, the end gain, no clipping and equal gain on 2 and 6 channels. It also checks the option ids against the renderer's table and the menu's rows and defaults.tests/test_menu_hit.cppgains checks for a four-tab strip.tests/run_all.pyshows no new failures on Windows: the 3 that fail locally fail the same way onmain.🤖 Generated with Claude Code