summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2018-12-14 00:35:01 +0900
committervolzhs <volzhs@gmail.com>2018-12-14 06:40:13 +0900
commit7d387dc63f75da867a1b9e07cd957b456de99c12 (patch)
tree65ebff10ca2e81cad785990d1e33305229a8243b /drivers
parent199c294d4c1f432be4370492902fdf7f9d7fccec (diff)
Request mic access only when is needed
Diffstat (limited to 'drivers')
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.cpp5
1 files changed, 4 insertions, 1 deletions
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,