[coreaudiod]画面右上のオレンジ・ドット(マイクアクセス)を切る
画面右上のマイクアクセス
本来、音声系のアプリケーションを終了させたら『消える』のが
正しいですが、オーディオ・プラグインが絡むので
アプリを終了させても、マイクアクセスを握ったままになるケースがあります。
(これは、アプリ側の問題)
これを、リセットするのは
コマンドだと
sh-3.2$
sh-3.2$
sh-3.2$ /usr/bin/sudo /usr/bin/killall coreaudiod
Password:
と、なりますが
これは、アップルスクリプトを利用すれば『指紋認証』使えるので便利
set aliasIconPass to (POSIX file "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Actions.icns") as alias
set strDialogText to "管理者パスワードが必要です"
set strDefaultAns to "123455"
set listButton to {"実行", "キャンセル", "指紋認証を使います"} as list
set objResponse to display dialog strDialogText buttons listButton default button 3 cancel button 2 default answer strDefaultAns with title strDialogText with icon aliasIconPass giving up after 10 with hidden answer
if (gave up of objResponse) is true then
return "時間切れになりました"
error number -128
else if (button returned of objResponse) is "キャンセル" then
return "キャンセルしました"
error number -128
else if (button returned of objResponse) is "指紋認証を使います" then
set strPassWord to "" as text
set numChkPw to 0
else
set strPassWord to (text returned of objResponse) as text
set numChkPw to 1
end if
set strCommandText to "/usr/bin/sudo /usr/bin/killall coreaudiod"
do shell script strCommandText with administrator privileges
(*
tell application "Terminal"
launch
activate
set objWindowID to (do script "\n\n")
delay 2
do script strCommandText in objWindowID
delay 2
do script strPassWord in objWindowID
delay 2
do script "\n" in objWindowID
end tell
(*
objWindowIDにWindowIDとTabIDが入っているので
objWindowIDに対してbusyを確認する事で
処理が終わっているか?がわかる
*)
repeat
tell application "Terminal"
set boolTabStatus to busy of objWindowID
end tell
if boolTabStatus is false then
exit repeat
--->このリピートを抜けて次の処理へ
else if boolTabStatus is true then
delay 3
--->busyなのであと3秒まつ
end if
end repeat
tell application "Terminal"
launch
activate
do script "exit" in objWindowID
delay 10
tell window id numWindowID
try
close
end try
end tell
end tell
tell application "Terminal" to close (get window 1)
*)
| 固定リンク
「Media Music」カテゴリの記事
- [Music]メタデータの文字化け置換(EU系の文字化けの置換) 少し増えた(2024.03.18)
- [shortcut]再生中の音楽をShazamでしらべてタイトルアーティストを設定する(2023.12.11)
- [Music]メタデータの文字化け置換(1つ毎処理)(2023.12.09)
- [afinfo]ミュージックファイルの詳細メタ情報の取得(2023.11.01)
- [com.apple.metadata]オーディオファイルのコメントにビットレートを入れる(2023.11.01)