TheAmazingAudioEngine/TheAmazingAudioEngine — pull request #9 by rklaver (2013-04-17 13:29:16+00:00)
Title: Fetch achieved hardware sample rate after the audio session is activated

Hi,

I had some trouble using a different sample rate than the default 44.1kHz. Setting a different sample rate in the audioDescription parameter of AEAudioController initWithAudioDescription:inputEnabled: always resulted in 44.1kHz.

As it turns out, one should fetch kAudioSessionProperty_PreferredHardwareSampleRate only after the audio session is activated: https://developer.apple.com/library/ios/#qa/qa1631/_index.html

Thanks for the project, it's saving me a lot of time!