title: Enforcing an audio sampling rate in iOS
body: <p>I have an app that is using the RemoteIO Audio Unit to create sounds. However, due to latency and computational issues, the sampling rate of this system cannot be higher than 8 kHz. I use the following line to set the sampling rate.</p>
  
  <pre><code>AudioSessionSetProperty(kAudioSessionProperty_PreferredHardwareSampleRate,propSize,&amp;hwSampleRate)
  </code></pre>
  
  <p>However, on certain runs I get back a sampling rate of 44.1 kHz. In this case, my app appears to not be working since it cannot handle the computations at that sampling rate. What is my best option to enforce the sampling rate to be 8 kHz? Quitting and opening the app again works but makes for bad UX.</p>