I have the following simple code that plays a sound
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"sound" ofType:@"wav"];
player =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath: soundPath] error:nil];
player.volume = 1;
player.numberOfLoops = 0;
[player prepareToPlay];
[player play];
For some reason this code only plays in the simulator but not the device, any ideas?
Update: Actually I installed AvTouch, a sample app from Apple onto 3.0 and that doens't work either. Is something wrong with AVAudioPlayer?