I've been going back and forth with this -- the issue being that first gen iPhones seem to use a sample rate of 8000Hz for the mic input, and 44100 for the output normally.
I want to get 48000 out, but setPreferredHardwareSampleRate fails, since it (apparently) is trying to set the input, or maybe both the input and the output, and the device refuses to go above 8000 for the built-in mic. I suppose that the hardware doesn't support this.
I need to use audio units, and the only place that I could find to set a sample rate is in the stream format. But the device (framework?) seems to ignore this also. In fact, if I intercept a stream and check the format, the sample rate is set to 0.
I think there is a way to do this, but I am stumped.
Any information, or pointers to information would be appreciated.
Andrew