I'm developing an iPhone application and want to playback and record sound from the bottom speaker and microphone without any embedded audio processing. If I use the following code, the sound comes from the top speaker. If I also add "try playbackSession.setCategory(AVAudioSession.Category.multiRoute)" then the sound comes from both the top and bottom speaker. If I use any other setMode than measurement, then there is an embedded audio processing that I want to avoid.
playbackSession = AVAudioSession.sharedInstance()
do { try playbackSession.overrideOutputAudioPort(AVAudioSession.PortOverride.speaker) try playbackSession.setMode(AVAudioSession.Mode.measurement)) } catch {print("Playing over the device's speakers failed") }
Does anyone have any idea on how to solve this problem?