summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-14 08:57:22 +0100
committerGitHub <noreply@github.com>2018-12-14 08:57:22 +0100
commit4148eed9437d8d01afc3cfa69279f2c3d9dc48c6 (patch)
treefbcc68815d9cbbd8e3c0355630a16cb009459c24 /drivers
parent7e4e9e95e4fb654f99721b093e6ed15d0bacc0d0 (diff)
parent7d387dc63f75da867a1b9e07cd957b456de99c12 (diff)
Merge pull request #24324 from volzhs/access-mic
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,