title: iPhone SDK: Play a single WAV from a button
body: <p>I am currently trying out this code:</p>
  
  <pre><code>NSString *path = [[NSBundle mainBundle] pathForResource:@"dream" ofType:@"m4a"];  
  AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];  
  theAudio.delegate = self;  
  [theAudio play];
  </code></pre>
  
  <p>However, the SDK says that the ViewController does not implement the AVAudioPlayer Delegate.</p>
  
  <p>Any body any ideas on how to play a WAV (or M4a) using the 2.2 SDK?</p>