-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional debug logging in release builds.
Clicking the status bar icon with the option key held now reveals a setting that enables debug logging in BGMApp. It's enabled by default in debug builds. It doesn't enable debug logging in BGMDriver or BGMXPCHelper yet. This will hopefully make it easier for people to include logs when they report bugs that don't occur with most hardware or are otherwise hard to reproduce. Enabling debug logging should be unlikely to cause audio glitches, but I haven't tried to make it completely safe. Also, - add some basic unit tests for BGMPlayThrough and expand the mocks for the CoreAudio HAL API, - fix the UI tests so you can run them without code signing them, and - update copyright years.
- Loading branch information
1 parent
8ca17bb
commit 2c16773
Showing
56 changed files
with
3,182 additions
and
439 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.automation.apple-events</key> | ||
<true/> | ||
<key>com.apple.security.device.audio-input</key> | ||
<true/> | ||
<!-- | ||
Without this key, AddressSanitizer and the UI tests would only work when BGMApp is code signed. | ||
--> | ||
<key>com.apple.security.cs.disable-library-validation</key> | ||
<true/> | ||
</dict> | ||
</plist> |
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// This file is part of Background Music. | ||
// | ||
// Background Music is free software: you can redistribute it and/or | ||
// modify it under the terms of the GNU General Public License as | ||
// published by the Free Software Foundation, either version 2 of the | ||
// License, or (at your option) any later version. | ||
// | ||
// Background Music is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Background Music. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
// | ||
// BGMDebugLoggingMenuItem.h | ||
// BGMApp | ||
// | ||
// Copyright © 2020 Kyle Neideck | ||
// | ||
// A menu item in the main menu that enables/disables debug logging. Only visible if you hold the | ||
// option down when you click the status bar icon to reveal the main menu. | ||
// | ||
// TODO: It would be better to have this menu item in the Preferences menu (maybe in an Advanced | ||
// section) and always visible, but first we'd need to add something that tells the user how | ||
// to view the log messages. Or better yet, something that automatically opens them. | ||
// | ||
|
||
// System Includes | ||
#import <Cocoa/Cocoa.h> | ||
|
||
|
||
#pragma clang assume_nonnull begin | ||
|
||
@interface BGMDebugLoggingMenuItem : NSObject | ||
|
||
- (instancetype) initWithMenuItem:(NSMenuItem*)menuItem; | ||
|
||
// True if the main menu is showing hidden items/options because the user held the option key when | ||
// they clicked the icon. This class makes the debug logging menu item visible if this property has | ||
// been set true or if debug logging is enabled. | ||
@property (nonatomic) BOOL menuShowingExtraOptions; | ||
|
||
@end | ||
|
||
#pragma clang assume_nonnull end | ||
|
Oops, something went wrong.