diff options
author | volzhs <volzhs@gmail.com> | 2018-12-14 00:35:01 +0900 |
---|---|---|
committer | volzhs <volzhs@gmail.com> | 2018-12-14 06:40:13 +0900 |
commit | 7d387dc63f75da867a1b9e07cd957b456de99c12 (patch) | |
tree | 65ebff10ca2e81cad785990d1e33305229a8243b /drivers/coreaudio | |
parent | 199c294d4c1f432be4370492902fdf7f9d7fccec (diff) |
Request mic access only when is needed
Diffstat (limited to 'drivers/coreaudio')
-rw-r--r-- | drivers/coreaudio/audio_driver_coreaudio.cpp | 5 |
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, |