Skip to content

Add optional master volume for FineTune-managed audio - #497

Closed
RobinLandy wants to merge 10 commits into
ronitsingh10:mainfrom
RobinLandy:feat/optional-master-volume
Closed

RobinLandy wants to merge 10 commits into
ronitsingh10:mainfrom
RobinLandy:feat/optional-master-volume

Conversation

@RobinLandy

Copy link
Copy Markdown

Add optional master volume for FineTune-managed audio

Target branch ronitsingh10/FineTune:main
Source branch RobinLandy/FineTune:feat/optional-master-volume

What changes

  • Adds an opt-in master slider, mute and media-key control for audio processed by FineTune. The popup and interactive HUD control the same master value. Per-app levels and output-device levels retain their independent settings.
  • Saves the enabled flag, level and mute state. Each CoreAudio IOProc owns its master ramp, reads a lock-free target, and applies gain after EQ and limiting. A new tap starts at the saved gain, and a crossfade destination keeps its ramp when promoted.
  • Handles output-switch cancellation and teardown in order, keeps the app volume target intact during destructive switches, and checks that a crossfade destination is rendering before promotion. A fresh input lock takes its initial preference from the current macOS input.
  • Adds regression coverage for master adjustment, mute/unmute, settings reload, channel and crossfade gain, reconnect routing, and microphone lock.

Validation

  • Xcode 27.2 on macOS 27.2.1, Apple silicon. The Release build succeeded and the complete FineTune unit target passed with 767 tests. The shared scheme skips the empty UI-test target, consistent with CI.
  • The automated reconnect cases inject device and default-input events. Manual testing on the fork owner's Mac produced the expected behaviour in the scenarios tried. The exact AirPods models and DJI reconnect scenarios exercised are unconfirmed.
  • Apple documents an AVFAudio device-property crash fix in macOS 27. The branch uses the existing CoreAudio process-tap APIs. The output-switch guards apply to invalid rate reads and transitions without assuming a macOS 27-specific cause. The reported WeChat and wired AirPods Max symptoms remain unverified on this branch. Apple macOS 27 release notes · WeChat issue #483 · AirPods Max issue #491

Related work

  • The master-volume processor was adapted from wait2050's GPLv3 FineTune-Sync implementation. The project retains its GPLv3 license. FineTune-Sync source commit
  • The idle-crossfade fix follows NicoM701's analysis. The already-default reconnect case follows clem-git's open PR and uses the existing routing method. Crossfade PR #487 · Reconnect PR #314

Keep a lock-free gain target and give each IOProc its own ramp. Route the popup, media keys and HUD through the master setting. Order switch cleanup, guard reconnect promotion and preserve input preference and persisted levels.

The initial master-volume DSP was adapted from wait2050/FineTune-Sync (GPLv3), be99199. The targeted reconnect and idle crossfade fixes follow upstream FineTune PRs ronitsingh10#314 (clem-git) and ronitsingh10#487 (NicoM701).
@RobinLandy RobinLandy closed this Nov 16, 2026
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.

1 participant