Repository navigation
Conversation
A Volume slider on the Insert menu's Gameplay tab (Muted, 5% to 100%, in steps of 5; 100% by default, the game's own). It applies at once and is kept in hookshot_options.ini as volume=. host/nn_audio.c scales the final mix after the limiter, before the samples are made, with HOS_OPT_VOLUME read once per 5 ms frame. The gain is the square of the share (50% is -12 dB), so each step sounds about as large as the last, and it ramps over a frame like the game's own volume changes, so dragging the slider does not click. At 100% the samples are untouched. tests/test_audio_volume.py checks the row, the renderer's answer for the new id (an unanswered id would be 0: silence) and runs the real gain and ramp code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
getzabelz
force-pushed
the
feat/audio-volume
branch
from
November 10, 2026 17:49
6bc27db to
7f239b9
Compare
Contributor
Author
|
Closing this: #1270 (merged today) already adds a Volume slider in the new Audio tab, with the same curve (the square of the share) and ramp, plus Mute in background. It also saves as |
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
A Volume row on the Insert menu's Gameplay tab (above Audio output): a slider from Muted to 100% in steps of 5, 100% by default (the game's own level). It applies at once and is kept in
hookshot_options.iniasvolume=. Help line: "Master volume level."How
host/nn_audio.c:au_volume_applyscales the final mix inrender_frame, after the limiter and before the samples become int16, withrx_option(HOS_OPT_VOLUME, 100)read once per 5 ms frame.gpu/vk/vk_api.h:HOS_OPT_VOLUME(44), afterHOS_OPT_DISCORD.gpu/vk/vk_replay.cpp: the option table answers it (clamped 0..100). An id the table does not answer reads as 0, which would silence the game, so the test checks for this line.gpu/vk/vk_menu.{h,cpp}:opts.volume, the row (preset_exempt, not a restart row),tx_volume, and the slider / stop-at-ends lists.readme.md: the options table and a line in the option notes.Tests
tests/test_audio_volume.py(registered inrun_all.pywith--cc gcc): checks the row, the default, the slider flags, the enum and the renderer's answer, and that the call sits after the limiter. It also compiles the realau_volume_gain/au_volume_applyand checks 100% = unchanged, 0% = silence, 50% = 0.25, monotonic steps, and the ramp up and down without overshoot.run_all.pyon Windows: everything passes exceptnup_paths,builder_dlss_update,fpx_stickyandprecompile_compute_guard, which fail the same way on a cleanmainhere (local environment).