Okay so I've been working on this for 15 hours now and have tried everything. AVAudioPlayer runs fine on the simulator but doesn't play any sound or output any errors on the device.
The case of the file names are the same (copy pasted into the code).
The files were recorded in Adobe Soundbooth and converted to WAV by audacity then converted to caf using:
Code:
afconvert -f caff -d LEI16@44100 -c 0 male1.wav male1.caf
then turned into a mono caf file using:
Code:
afconvert -v -f caff -d ima4 -c 1 male1.caf male1.caf
What the hell is going on? Here's my code for playback:
Code:
AVAudioPlayer *myExampleSound;
NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"male1" ofType:@"caf"];
myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:NULL];
myExampleSound.delegate = self;
[myExampleSound prepareToPlay];
[myExampleSound play];