AVAudioSession's PlayAndRecord category and AVAudioSessionModeMeasurement are incompatible with defaultToSpeaker option?
Asked Answered
K

1

7

Attempting to put AVAudioSession into the .playAndRecord category with the AVAudioSessionModeMeasurement mode causes the .defaultToSpeaker option to be ignored, resulting in output being played quietly out the earpiece (also known as the receiver).

Keciakeck answered 18/7, 2017 at 0:35 Comment(0)
K
3

While there doesn't seem to be much written about this the documentation makes this "end result of audio output being sent to the receiver rather than speaker" seem like possible intended behavior and not a bug.

let AVAudioSessionModeMeasurement: String

This mode is intended for apps that need to minimize the amount of system-supplied signal processing to input and output signals. If recording on devices with more than one built-in microphone, the primary microphone is used.

Keciakeck answered 18/7, 2017 at 0:35 Comment(2)
I created a bug report awhile back for a similar (possibly the same) issue, and Apple later closed it stating it was by design. bugreport.apple.com/web/?problemID=16402045Visconti
Thanks @Arda, since radars aren't public would you mind cross posting to openradar.me and sharing that link?Keciakeck

© 2022 - 2024 — McMap. All rights reserved.