[vlc-commits] avaudiocapture: Inform user when microphone access is not granted

David Fuhrmann git at videolan.org
Tue Feb 11 18:59:09 CET 2020


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu Feb  6 22:25:07 2020 +0100| [5bf292da9676e1029682c850d994af401c4c1eba] | committer: David Fuhrmann

avaudiocapture: Inform user when microphone access is not granted

macOS only asks once when requesting ressource access. If the user
declines for some reason, VLC will error out silently in subsequent
tries. Lets inform the user and explain better what he needs to
change in order to gain access again.

(cherry picked from commit aea90ab3546ff343a1dd4a34a94d75e1a35fb83c)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=5bf292da9676e1029682c850d994af401c4c1eba
---

 modules/access/avaudiocapture.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/access/avaudiocapture.m b/modules/access/avaudiocapture.m
index c4d2098762..e20d8aadf3 100644
--- a/modules/access/avaudiocapture.m
+++ b/modules/access/avaudiocapture.m
@@ -233,6 +233,10 @@ static int Open(vlc_object_t *p_this)
             dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
             if (!accessGranted) {
                 msg_Err(p_demux, "Can't use the audio device as access has not been granted by the user");
+                vlc_dialog_display_error(p_demux, _("Problem accessing a system resource"),
+                    _("Please open \"System Preferences\" -> \"Security & Privacy\" "
+                      "and allow VLC to access your microphone."));
+
                 return VLC_EGENERIC;
             }
         }



More information about the vlc-commits mailing list