diff --git a/examples/AudioAppExample/Source/MainComponent.cpp b/examples/AudioAppExample/Source/MainComponent.cpp index 08938a1c53..b350672f45 100644 --- a/examples/AudioAppExample/Source/MainComponent.cpp +++ b/examples/AudioAppExample/Source/MainComponent.cpp @@ -27,8 +27,8 @@ public: { setSize (800, 600); - // specify the number of input and output channels that we want to open - setAudioChannels (2, 2); + // Specify the number of input and output channels that we want to open. + setAudioChannels (0, 2); } ~MainContentComponent() @@ -90,7 +90,7 @@ public: lastMousePosition.y - radius / 2.0f, radius, radius); - // draw a representative sinewave + // Draw a representative sine wave. Path wavePath; wavePath.startNewSubPath (0, centreY); diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_AndroidBase.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_AndroidBase.h index d4b7fbf03b..123f140c89 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_AndroidBase.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_AndroidBase.h @@ -35,7 +35,7 @@ public: androidMinimumSDK (settings, Ids::androidMinimumSDK, nullptr, "23"), androidTheme (settings, Ids::androidTheme, nullptr), androidInternetNeeded (settings, Ids::androidInternetNeeded, nullptr, true), - androidMicNeeded (settings, Ids::androidMicNeeded, nullptr, false), + androidMicNeeded (settings, Ids::microphonePermissionNeeded, nullptr, false), androidBluetoothNeeded (settings, Ids::androidBluetoothNeeded, nullptr, true), androidOtherPermissions (settings, Ids::androidOtherPermissions, nullptr), androidKeyStore (settings, Ids::androidKeyStore, nullptr, "${user.home}/.android/debug.keystore"), diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h index c8196152e0..b2fba317ff 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h @@ -97,6 +97,8 @@ public: Value getCustomXcassetsFolderValue() { return getSetting (Ids::customXcassetsFolder); } String getCustomXcassetsFolderString() const { return settings [Ids::customXcassetsFolder]; } + Value getMicrophonePermissionValue() { return getSetting (Ids::microphonePermissionNeeded); } + bool isMicrophonePermissionEnabled() const { return settings [Ids::microphonePermissionNeeded]; } Value getInAppPurchasesValue() { return getSetting (Ids::iosInAppPurchases); } bool isInAppPurchasesEnabled() const { return settings [Ids::iosInAppPurchases]; } Value getBackgroundAudioValue() { return getSetting (Ids::iosBackgroundAudio); } @@ -161,6 +163,10 @@ public: props.add (new BooleanPropertyComponent (getSetting ("UIStatusBarHidden"), "Status Bar Hidden", "Enabled"), "Enable this to disable the status bar in your app."); + props.add (new BooleanPropertyComponent (getMicrophonePermissionValue(), "Microphone access", "Enabled"), + "Enable this to allow your app to use the microphone. " + "The user of your app will be prompted to grant microphone access permissions."); + props.add (new BooleanPropertyComponent (getInAppPurchasesValue(), "In-App purchases capability", "Enabled"), "Enable this to grant your app the capability for in-app purchases. " "This option requires that you specify a valid Development Team ID."); @@ -1151,6 +1157,8 @@ public: if (owner.iOS) { addPlistDictionaryKeyBool (dict, "LSRequiresIPhoneOS", true); + if (owner.isMicrophonePermissionEnabled()) + addPlistDictionaryKey (dict, "NSMicrophoneUsageDescription", "This app requires microphone input."); if (type != AudioUnitv3PlugIn) addPlistDictionaryKeyBool (dict, "UIViewControllerBasedStatusBarAppearance", false); diff --git a/extras/Projucer/Source/Utility/jucer_PresetIDs.h b/extras/Projucer/Source/Utility/jucer_PresetIDs.h index e594a8c8bb..b65beff8ad 100644 --- a/extras/Projucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Projucer/Source/Utility/jucer_PresetIDs.h @@ -147,6 +147,7 @@ namespace Ids DECLARE_ID (showAllCode); DECLARE_ID (useLocalCopy); DECLARE_ID (overwriteOnSave); + DECLARE_ID (microphonePermissionNeeded); DECLARE_ID (androidActivityClass); DECLARE_ID (androidActivitySubClassName); DECLARE_ID (androidVersionCode); @@ -154,7 +155,6 @@ namespace Ids DECLARE_ID (androidNDKPath); DECLARE_ID (androidInternetNeeded); DECLARE_ID (androidArchitectures); - DECLARE_ID (androidMicNeeded); DECLARE_ID (androidBluetoothNeeded); DECLARE_ID (androidMinimumSDK); DECLARE_ID (androidOtherPermissions);