title: How do I record and play back sound on the iPhone?
body: <p>In my app I've got certain buttons which use the following code:</p>
  
  <pre><code>SystemSoundID beep;
  
  CFStringRef beepPath = (CFStringRef) [NSString stringWithFormat: @"%@/SoundFile.aif", [[NSBundle mainBundle] bundlePath]];
  AudioServicesCreateSystemSoundID (CFURLCreateWithFileSystemPath (NULL, beepPath, kCFURLPOSIXPathStyle, false), &amp;beep);
  CFRelease(beepPath);
  
  AudioServicesPlaySystemSound (beep);
  </code></pre>
  
  <p>I would like the user to start recording and be able to record <strong>any</strong> sounds made by the app and then have the ability to play the recorded sound after a certain time limit, or have a stop recording button and then a 'Play' button to play the recorded clip.</p>
  
  <p>Any ideas on how I can implement this?</p>