I'm trying to get a simple button to play a sound:
-(IBAction)myButton:(id)sender {
NSString *audioFilePath = [[NSBundle mainBundle] pathForResource:@"whistle" ofType:@"wav"];
AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:audioFilePath] error:NULL];
[audioPlayer play];
}
Using the debugger, the call to 'play' never returns. No sound is played either. The button stays in the highlighted state until I hit the home button to exit the app.
From the about menu of the simulator I'm using 'Version 2.2 (77.4.9)'.
-Bill