Wednesday, May 2, 2018

Panning sound between top and bottom speaker on iPhone 7

Leave a Comment

Is it possible to pan sound to either the top or bottom speaker on the iPhone 7 and newer models? I don't have one of these phones, but my understanding is that iOS mixes stereo sound and plays it back from both speakers when the phone is in portrait mode. I know it routes left and right channels to their respective speakers in landscape, but I can't find documentation about the behavior in portrait mode.

Is it possible to limit playback to just one speaker or the other, or to pan between top and bottom? My library cannot operate with the destructive interference of both speakers playing at the same time.

1 Answers

Answers 1

Checkout AVAudioSession class, I don't think you can do that. This is available under accessibility settings for override by end users. What you can do is toggle between speakers and earphone.

Though you can check this gist - https://gist.github.com/rfistman/1c63315d6634112eac8b1f7dc9dffe64

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment