Hi iOS Programming.
I̵7;m trying to figure out if it̵7;s possible to play sound on just one of the iPhone 7̵7;s speakers when the phone is in portrait mode. I would just try this myself except I have an older phone, and the simulator isn̵7;t accurate enough to test it. It needs to be a real device in order to work.
I have been told that feeding the phone a stereo source with just one channel playing results in the sound coming out of both speakers in portrait mode. The iPhone apparently mixes it and creates a mono channel. For this reason, I suspect that panning left and right will have similar behavior, but it’s worth testing.
There’s one more interesting possibility with kAudioQueueProperty_ChannelAssignments https://developer.apple.com/documentation/audiotoolbox/1618733-anonymous/kaudioqueueproperty_channelassignments which I think actually may work where the other two do not. I have been told that each of the speakers appears as a separate channel when queried with
This is where I can use your help. I have a very basic experiment ready to go that just needs to be tested on a real device. Just compile it, run it, and then tell me what happens when you click each of the rows. For the purposes of localizing which speaker the audio comes from, it may help to muffle each one with your finger, just to be sure. I’m mostly curious how the phone works in portrait orientation, but knowing about landscape might be interesting too. Feel free to audit the code if you want, there’s really not much to this.
(Alternately if you just know the answer to this, please tell me. I’ve had a very hard time finding credible sources)
Code is here https://github.com/brian-armstrong/speaker-tester