iPhone 6s sample rate quality issue?

The iPhone 6s RemoteIO Audio Unit appears to default to a hardware sample rate of 48000 sps. When my app requests a preferred output sample rate of 44100 on an iPhone 6s, the automatic resampling from 48k to 44.1k appears to be low quality and noisy (appears to adds a lot of spectral aliasing). Far more noisy than on any iPhone 6, 5s or earlier that I've tested using 44.1 ksps RemoteIO mic recording.

Is this a bug? Or did I miss some new setting allowing for a 44100 hardware sample rate or a higher quality sample rate conversion?

Accepted Reply

See <https://forums.developer.apple.com/message/72961>

Replies

There's an ongoing discussion about this over in The Amazing Audio Engine forums!


"Turns out, the 6S (and the 6S Plus) is a tricky little device: unlike those that have come before, the iPhone 6S's hardware sample rate cannot be changed when there's no headset or audio interface plugged into it: it's jammed in the 48 kHz position. What's annoying is that in certain circumstances there are mismatches between the input and the output frame count for any given time interval. This is probably due to the need for sample rate converters, but it's causing havoc with many apps, including some of those built with TAAE."

See <https://forums.developer.apple.com/message/72961>

Hi

I am working with live video streaming. But now i face an issue with iPhone6s. My video streaming library is working only with 8k sample rate. But from different blogs i found the iPhone 6s is locked in 48K. So i can't able to hear any sound when i stream video using iPhone 6s. Anyone please guid me to downscale my audio from 48k to 8k. Its a huge headache for me.

It is interesting though, that the solution is of course to not make assumptions regarding sample rate (which is correct), but there is no mention of why setPreferredSampleRate:error: succeeds, yet no change occurs.

Note that setPreferredSampleRate: includes the fragment "Preferred", likely meaning this is a preference, not a demand or requirement. The message is not just setHardwareSampleRateNow:, which might be expected to return an error if the hardware wasn't capable. Also, this preference does appear to be honored if a headset (and perhaps USB microphone?) is plugged-in, so it's not just silently ignored, just possibly postponed.

Q&A1631AVAudioSession - Requesting Audio Session Preferences is a good document to take a look at for a discussion of this topic: https://developer.apple.com/library/ios/qa/qa1631/_index.html