From 7d387dc63f75da867a1b9e07cd957b456de99c12 Mon Sep 17 00:00:00 2001 From: volzhs Date: Fri, 14 Dec 2018 00:35:01 +0900 Subject: Request mic access only when is needed --- drivers/coreaudio/audio_driver_coreaudio.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/coreaudio') diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index 726cee10a4..3d093b965a 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -159,7 +159,10 @@ Error AudioDriverCoreAudio::init() { result = AudioUnitInitialize(audio_unit); ERR_FAIL_COND_V(result != noErr, FAILED); - return capture_init(); + if (GLOBAL_GET("audio/enable_audio_input")) { + return capture_init(); + } + return OK; } OSStatus AudioDriverCoreAudio::output_callback(void *inRefCon, -- cgit v1.2.3