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).
Asked
Active
Viewed 1,869 times
6

mahal tertin
- 3,239
- 24
- 41

Warpling
- 2,024
- 2
- 22
- 38
1 Answers
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.
-
I created a bug report awhile back for a similar (possibly the same) issue, and Apple later closed it stating it was by design. https://bugreport.apple.com/web/?problemID=16402045 – Arda Apr 26 '18 at 23:23
-
Thanks @Arda, since radars aren't public would you mind cross posting to openradar.me and sharing that link? – Warpling Apr 30 '18 at 16:33