MPVolumeView fails to adjust volume when the PlayAndRecord AudioSession category is used with any of the Chat modes
| Originator: | pieterscholtz | ||
| Number: | rdar://15119049 | Date Originated: | 01-Oct-2013 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 7.0 and 7.0.2 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: When using the PlayAndRecord AudioSession category with any of the Chat modes, i.e. VoiceChat, GameChat and VideoChat, the volume cannot be adjusted using the MPVolumeView slider as expected. Furthermore, in these configurations, the first attempt at adjusting volume using the slider would unexpectedly display the volume setting HUD. The exact same problem is reproduced if an otherwise working Mode, e.g. the Default mode, is used in conjunction with the kAudioUnitSubType_VoiceProcessingIO audio unit. Since the Chat modes may implicitly use the VPIO unit, these problems may share a common origin. It is important to note that this appears to be a regression in iOS 7.0.x as I cannot reproduce these problems on iOS 6.1. Steps to Reproduce: 1. Set the - [AVAudioSession sharedInstance] category to AVAudioSessionCategoryPlayAndRecord. 2. Set the shared audio session mode to either AVAudioSessionModeVoiceChat, AVAudioSessionModeGameChat or AVAudioSessionModeVideoChat. 3. Make the audio session active. 4. Use an MPVolumeView to adjust the volume. Expected Results: Expected the volume to be reduced when moving the MPVolumeView slider to the left. Expected the volume to be increased when moving the MPVolumeView slider to the right. Actual Results: No change in volume is observed. The first adjustment to the MPVolumeView slider unexpectedly displays the volume HUD which is typically displayed when an iOS device's hardware volume buttons are used to adjust the volume, unless an MPVolumeView is being displayed on-screen. Version: iOS 7.0 and 7.0.2 Notes: We are currently working around this problem by providing an option to disable use of the voice processing audio unit. This is unfortunate since VP provides valuable functionality to our application, the echo cancellation in particular. A sample app is attached that demonstrates the problem. The app has a picker to select from the available audio session categories and modes, a switch to activate/deactivate the audio session, and an MPVolumeView to adjust the volume. When activating the audio session for a category that supports playback, a sample loop will start playing. Configuration: This problem occurs on iOS devices running iOS 7.0.x, as tested on iPhone 5 and 3rd gen iPad. The problem does not occur on iOS devices running prior versions of iOS, as tested on iOS 6.1.3, as tested on iPad 2. Since the iOS Simulator does not support MPVolumeView the problem cannot be observed using the Simulator.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Sample project on GitHub demonstrating the issue https://github.com/pieterscholtz/AudioSessionToy