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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With