Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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).

like image 232
Warpling Avatar asked Oct 18 '22 09:10

Warpling


1 Answers

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.

like image 53
Warpling Avatar answered Oct 20 '22 22:10

Warpling