Skip to content

fix(audio): remove Independent Volume instead of writing system volume - #989

Open
postoso wants to merge 2 commits into
altic-dev:mainfrom
postoso:fix/522-app-local-cue-gain
Open

postoso wants to merge 2 commits into
altic-dev:mainfrom
postoso:fix/522-app-local-cue-gain

Conversation

@postoso

@postoso postoso commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Description

This is the change you floated on #867, dropping the Independent Volume option outright instead of keeping it with app-side compensation. I pushed it on 2026-09-02, and the stale bot closed #867 on 2026-09-18 for inactivity, so this is the same branch at the same head (b7dd082) as a fresh PR. Ignore my 2026-09-10 comment on that thread saying the revision was still coming. It was already in at that point.

The toggle is gone, and so is the save, set and restore code that wrote the Mac output volume. What is left is the one cue-volume slider. The cue plays at that level through AVAudioPlayer, so it scales with system output like any other sound, and nothing in the app writes the system volume any more.

One thing stays on purpose. The backup payload still encodes transcriptionSoundIndependentVolume as false, because the schema is still 1.0 and the previous version's decoder requires the key. Nothing reads it back into settings, so the setting itself is gone.

Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Closes #522. Replaces #867, which the stale bot closed. This removes the only place the app wrote the system volume; if the spike in #522 still reproduces with the toggle gone, that is a different write and worth reopening.

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version:
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml
  • Ran formatter locally: swiftformat --config .swiftformat Sources
  • Ran tests locally

Same head as #867, so the checks there still hold. CI was green on b7dd082: Build FluidVoice, SwiftLint and the PR archive all passed. When I pushed it on #867, swiftlint --strict over the whole repository reported 7 violations, all legacy_swiftui_aspect_ratio and all in files this branch does not touch; a clean checkout of main reported the identical 7.

Locally I ran xcodebuild build-for-testing rather than the full suite at that time, so the test target compiles and CI ran the tests. The eight gain-policy tests this branch added earlier are gone, because the policy they covered no longer exists. DictationE2ETests.swift carries one test instead: encode a backup, check the deprecated key is written as false, strip the key, check the payload still decodes.

It still merges clean into current main, so no rebase.

Screenshots / Video

  • No UI/visual changes; screenshots/video are not applicable.

Settings sound section on current main. This PR removes the Independent Volume row.

FluidVoice Settings sound section on current main, showing the Independent Volume row and its two lines of copy

@greptile-apps

greptile-apps Bot commented Sep 20, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, compatibility, or repository-rule issues remain.

Summary

Removes the Independent Volume setting and all CoreAudio system-volume manipulation while retaining backward-compatible backup encoding.

  • Cue volume now applies only through AVAudioPlayer.volume.
  • Removes the persisted setting and its Settings UI toggle.
  • Continues encoding the deprecated backup key as false, tolerates its absence, and ignores it during restoration.
  • Adds integration coverage for backup encoding and decoding without the deprecated key.

Reviews (2) · Last reviewed commit: "fix(backup): keep deprecated independent..."

Independent Volume was the only code path that wrote the macOS output
volume. It saved the current level, set the output to the selected cue
level for the length of the cue, then restored it, which is what let a
transcription cue change other applications' audio (altic-dev#522).

Compensating app-side instead does not preserve what the option
promised. The CoreAudio volume scalar and AVAudioPlayer.volume are
different gain domains, so a player gain derived from their ratio does
not land on the selected level, and it caps at full gain once the
selected level is above the current output.

Removing the option leaves one cue-volume slider, and nothing writes the
system volume any more. It also removes four failure modes that lived in
the save/restore path: a failed CoreAudio read was saved as 1.0 and
restored as maximum, the restore re-resolved the default output so
switching outputs mid-cue wrote one device's baseline onto another, the
delayed restore had no termination handler, and overlapping cues shared
one saved-volume slot.

The Independent Volume settings copy is removed with the toggle. It
described the old behaviour ("stays constant regardless of system
volume", "temporarily changes system volume during playback") and was
wrong in both directions either way.
@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown

FluidVoice PR build ready

Download FluidVoice-PR-989-db4e09d97e74

The artifact contains the ad-hoc-signed app ZIP, Xcode archive, build manifest, and installation instructions. It expires 5 days after the build.

Install the app

  1. Extract the downloaded artifact, then extract FluidVoice-PR-989.app.zip.

  2. Move FluidVoice fix(audio): remove Independent Volume instead of writing system volume #989.app into the /Applications folder.

  3. Open Terminal and remove the download quarantine marker:

    xattr -dr com.apple.quarantine "/Applications/FluidVoice #989.app"
    
  4. In Applications, Control-click FluidVoice fix(audio): remove Independent Volume instead of writing system volume #989.app and choose Open.

  5. If macOS still blocks it, open System Settings → Privacy & Security, click Open Anyway, and confirm.

This build has its own app identity, so its permissions are separate from the release version of FluidVoice.

View workflow run

…orts

Dropping transcriptionSoundIndependentVolume from SettingsBackupPayload broke
downgrades: the previous app version's synthesized decoder still requires that
key, and the schema stays 1.0, so a backup written by this build looks
compatible and is reported as invalid JSON instead.

Encode the key again with a fixed false and decode it tolerantly. Nothing reads
it back into settings, so Independent Volume stays removed.
@postoso
postoso force-pushed the fix/522-app-local-cue-gain branch from b7dd082 to db4e09d Compare September 20, 2026 02:43
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.

Independent volume selection causes temporary system volume spike

1 participant