5

As far as I've been able to tell, whenever you override an audio route in the iPhone, you have to change both the output AND input routes together. The only available routes I'm aware of are:

"Headset" "Headphone" "Speaker" "SpeakerAndMicrophone" "HeadphonesAndMicrophone" "HeadsetInOut" "ReceiverAndMicrophone" "Lineout"

Is there any way to record from the line input/headset in and play through the speaker?

alexbw
  • 2,028
  • 2
  • 21
  • 25

1 Answers1

2

After talking with Apple engineers on the Coreaudio mailing list, I've found it's not currently possible to do this with a single RemoteIO audio unit.

I'm going to try to instantiate two audio units, one for playing, the other for acquisition, but I'm not hopeful. We shall see.

alexbw
  • 2,028
  • 2
  • 21
  • 25
  • How about http://stackoverflow.com/questions/1064846/iphone-audio-playback-force-through-internal-speaker – P i Jun 29 '11 at 05:02
  • That is how you would ask for an audio route change, yes. but, the input/output combination of speaker and headphone mic input is not valid. using the code referenced there does nothing, unfortunatley. – alexbw Jun 29 '11 at 19:36
  • Oh :| dayerm. I always found it annoying that you couldn't independently choose an input and output. Have a look at the WWDC11 video on audio sessions, they have sorted some of the issues out! (NDA so I can't be more specific. plus, I only glanced through it so I'm not entirely sure whether it sorts out your problem). if you do find a solution, please post what you can! I will be running into this problem also before long. – P i Jun 30 '11 at 04:34
  • Yeah, I looked at those, and I think I can openly express pessimism without breaking NDA. The issue is still that Apple will reject certain combinations of input/output routes, even though you might now express a request for them differently. I think it makes sense, though, for the most part. Imagine a speaker right next to the microphone, playing what the mic pics up — nasty, NASTY feedback right quick. The issue is that the iPhone doesn't know when the headphone mic input is from a line in taking audio from a non-local source, and when its a mic right next to the device. – alexbw Jun 30 '11 at 15:35