title: iPhone not playing mp3 sound using type=@"mp3"
body: <p>I am writing an iPhone app that when a certain thing occurs, a sound is played.  I have trying using different WAV, MP3, M4A files and have intermittent problems.  The below code works fine in the simulator but the MP3 does not play on the iPhone.  (3GS if it matters).  Any ideas?  I have changed the mp3 file to a wav and it will work for the one supplied below (knock_knock), but not another.  Possibly the way it is encoded?</p>
  
  <p>Any help is appreciated.  Thanks</p>
  
  <p>Here is the code:</p>
  
  <pre><code>SystemSoundID soundID;
  NSString *soundFile;
  
  if (something == somethingelse) {
      soundFile = [[NSBundle mainBundle] pathForResource:@"knock_knock" ofType:@"wav"];
  }
  else {
     soundFile = [[NSBundle mainBundle] pathForResource:@"strike" ofType:@"mp3"];
  }
     AudioServicesCreateSystemSoundID((CFURLRef)
                                   [NSURL fileURLWithPath:soundFile]
                                   , &amp;soundID);
  AudioServicesPlaySystemSound(soundID);
  </code></pre>