-
Notifications
You must be signed in to change notification settings - Fork 741
Fix volume control for Electron apps (Discord, Brave) & Crash Fixes on macOS Tahoe #839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fix Discord/Brave volume control & crashes on macOS Tahoe
LoackyBit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the changes are too specific
|
@LoackyBit Thanks for the feedback! Actually, that was exactly my observation during testing. Standard apps and even some Electron apps like Google Chrome and Spotify work perfectly out of the box with the current system. However, I noticed that Discord and Brave specifically were completely unresponsive due to their non-standard process naming structure. Since these are very popular applications, I thought addressing them explicitly would be a significant quality-of-life improvement for many users, even if it's specific. Also, considering this PR fixes a critical crash (nullptr BundleID) that affects the stability of the whole app, I believe it's worth merging these specific fixes alongside the crash protection. |
|
Thanks for the PR. This looks useful. I'll try to test it and clean it up a bit today so we can get it merged. Or I can add review comments if you'd prefer to do that clean up yourself. |
|
Hi Kyle, thanks for the quick response! I'm glad to hear that you found the PR useful. Since you are more familiar with the project's coding style and best practices, it would be great if you could handle the clean-up/refactoring. I'd be happy to leave that to you to ensure it fits perfectly with the rest of the codebase. Thanks again for maintaining this awesome project! |
|
When I tested it, the helper processes Discord and Brave used to play their audio both/all had bundle IDs, so we can just add them to the map of helper bundle IDs in Can you test again with my new changes and see if the Discord and Brave volumes still always work for you? If they don't always work, let me know what you did in Discord/Brave to get it to play the audio that bypassed the volume control, and I'll try to reproduce it.
Can you check and see if you can still reproduce that crash with the current code (on the |
|
Also, I think you can ignore the failing PR checks. It's an existing issue. |
|
Hi Kyle, thanks for looking into this! I want to clarify one specific detail regarding your test to make sure we are on the same page: 1. Playback vs. Volume Control:
2. The "Helper" Behavior (Discord vs. Brave):
3. The Crash (Reproduction): 4. Current Status with this PR: Conclusion: |
BGMApp was setting the `kAudioDeviceCustomPropertyAppVolumes` property with only a process ID in the CFDictionary when the app had no bundle ID. BGMDriver would then cause a null deref in `BGM_ClientMap::GetClients`. See kyleneideck#839.
|
@abdulkadiryugruk My changes are already on your fork ( abdulkadiryugruk@d17ad6a
Thanks, I've reproduced it locally by hardcoding BGMApp to set the property without including a bundle ID. I think what was happening was BGMApp was setting the Let me know if Discord and Brave both still work for you after you update and we should be able to merge the PR. |
|
Hi Kyle, I've updated to your latest changes and tested thoroughly. Great news:
Everything looks perfect on my end. I think we are ready to merge! 🚀 A Personal Note: Thanks again for the quick and solid fix. |
|
Great, thanks for testing all that. I've merged the PR. |
This PR addresses critical volume control issues and crashes, specifically tested on macOS Tahoe 26.0.1.
Environment & Context:
Technical Changes:
nullptras BundleID to the driver (replaced with a safe placeholder).try-catchblocks and safe memory management around process iteration to prevent app crashes during volume adjustments.