Repository navigation
Conversation
Electron/Chromium helpers such as Discord.app/Contents/Frameworks/Discord Helper (Renderer).app are registered with NSWorkspace as running .app bundles, so they were treated as top-level apps. Discord's audio showed up under a separate "Discord Helper" row instead of "Discord". Only bundles not nested inside another .app now count as real apps; helpers resolve to their responsible parent.
The VU/output-gate peak only scanned the first channel of interleaved buffers. Apps that render into one side of a stereo stream (Discord renders right-only) read as silence, so the output gate never opened: the tap muted the app and FineTune played nothing. Extract the scan into ProcessTapController.inputPeak and read every sample.
|
hey, tried this locally on macos 27.0.1 and it fixed the issue for me. some clips with audio only on the right channel were silent at my usual volume. turning it up made them audible but it kept cutting in and out. same clips play fine now at the volume where they had no sound before. been dealing with this daily so thanks for the fix! would be nice to see this merged. |
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.
Summary
Two separate bugs together made some apps impossible to control: FineTune muted their original output and played back silence. Discord shows both bugs at once.
1. Nested helper apps showed up as their own app row
Chromium and Electron apps often play audio from a helper bundle inside the main app, for example
Discord.app/Contents/Frameworks/Discord Helper (Renderer).app. NSWorkspace lists these helpers as running.appbundles, so FineTune treated them as top-level apps. The audio appeared under a separate "Discord Helper (Renderer)" row instead of "Discord".The new
AudioProcessMonitor.isTopLevelAppBundle(_:)check is used in both lookups.2. The input peak scan read only the first channel
The audio callback measures the peak of the tapped input. That peak drives the VU meter and the output gate, which stays closed until it detects sound. The scan stepped through interleaved samples by the channel count, so it read only channel 0. An app that renders into only one side of a stereo stream reads as silence, so the gate never opens. Because the tap is
.mutedWhenTapped, the app's original output is muted too, and the user hears nothing.The scan moved into
ProcessTapController.inputPeak(_:)(static,@inline(__always)) so it can be tested. It stays RT-safe: no allocations, locks or logging.Evidence
Example case: Discord on macOS 27.0.1, playing sound to the built-in speakers.
A separate raw tap on the same process showed real audio on the right channel only:
L=0.000000 R=0.542171 ch=2, while FineTune's own level for Discord stayed at0.000000.Regression tests (Swift Testing):
The full unit test suite passes (
-skip-testing:FineTuneUITests).