ref: 5d295f00480a1531839272f737869f87afad93e2
parent: e02816128d18dbb46544ec84709257ff5c87265e
author: Olav Sørensen <olav.sorensen@live.no>
date: Fri Mar 18 18:22:53 EDT 2022
Fix broken audio sampling on macOS
--- a/make-macos.sh
+++ b/make-macos.sh
@@ -72,6 +72,7 @@
rm $TARGET_ARM64
strip $TARGET_UNIVERSAL
install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2 $TARGET_UNIVERSAL
+codesign -s - --entitlements pt2-clone.entitlements release/macOS/pt2-clone-macos.app
echo Done. The executable can be found in \'${RELEASE_MACOS_DIR}\' if everything went well.
#
--- /dev/null
+++ b/pt2-clone.entitlements
@@ -1,0 +1,8 @@
+<?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.device.audio-input</key>
+ <true/>
+</dict>
+</plist>
--- a/release/macos/pt2-clone-macos.app/Contents/Info.plist
+++ b/release/macos/pt2-clone-macos.app/Contents/Info.plist
@@ -51,5 +51,7 @@
<true/>
<key>NSHighResolutionCapable</key>
<true/>
+ <key>NSMicrophoneUsageDescription</key>
+ <string>This program needs access to your audio device.</string>
</dict>
</plist>