Search Issue Tracker
Third Party Issue
Votes
0
Found in
2021.3.35f1
2022.3.20f1
2023.2.10f1
2023.3.0b7
Issue ID
UUM-63547
Regression
No
[iOS] Audio volume decreases when using a microphone through the native plug-in on iOS 17 device
How to reproduce:
1. Build And Run the user’s attached “1757662-ios-mic.zip” project on an iOS 17 device
2. Press the “Mic On” button
3. Observe the volume of the noise sound
Expected result: Volume doesn’t change
Actual result: Volume decreases by a lot
Reproducible with: 2021.3.35f1, 2022.2.3.20f1, 2023.2.10f1, 2023.3.0b7
Reproduced on:
VLNQA00610 - iPhone 13 Pro, 17.2.1 iOS
Not reproducible on:
VLNQA00494 - iPhone 14 Pro Max, 16.3.1 iOS
VLNQA00358 - iPhone 12, 14.1 iOS
VLNQA00392 - iPad (9th generation), 15.0 iOS
VLNQA00310 - iPad Pro 12.9", 13.4.1 iOS
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inconsistent Placement of Search Clear (X) Icon in "Preset Manager"
- Gradient Editor window bottom-right gradient marker color is incorrect
- MaskField tooltips should only display Value when bound
- Reordering Enum Values in VFX Graph Uint Property expands the “Value” field
- Visual Effect Graph sample titles display in non-human-readable format
Resolution Note:
In this Unity project, a 3rd party plugin is capturing microphone data. It looks like the plugin is also making AVAudioSession changes. Much of the iOS AVAudioSession state is global, so once a plugin starts making those kinds of changes, the behavior is out of Unity's control. For example, when capturing mic data, by default the audio output will start getting routed only to the ear speaker, which will cause the overall volume to get reduced drastically. The plugin likely needs to add a line of code similar to the following to force both built-in output speakers to get used in this case:
[[AVAudioSession sharedInstance] overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:&osError];
I would guess the reason it works on some phones and OS versions, and not on others, is just the timing between when the Unity AVAudioSession code runs and when the plugin's AVAudioSession code runs. We've often seen this erratic behavior before when 3rd party code is making AVAudioSession changes.