Sound not working in device
<p>I am writing an application and part of it is recording and playing the sound using AVAudioRecorder and AVAudioPlayer class. I set up the sound file as below.</p>

<pre><code>NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
resourcePath = [resourcePath stringByAppendingString:@"/sound.caf"];    
self.soundFileURL = [NSURL fileURLWithPath:resourcePath];
</code></pre>

<p>When i run the app in simulator, it works fine.However when i load the app into the device it does not work.Does anyone have any idea what the problem could be.</p>

<p><hr /></p>

<p>Hi coob. i tried with your answer .But no sound in device .It works in simulator. When i tested in distribution device i got a crash report "unknown kernal[0]:ERROR:AMC reset[non-fatal error]:could not lock BSU "</p>
