Buggy OpenAL Code
I get EXC_BAD_ACCESS every time this runs.
It goes fine until it hits the return. For some reason outAFID is... broken? I've tested the code several times and I'm sure that the return statement is where is breaks. Any idea why?
NSURL * afUrl = [NSURL fileURLWithPath:filePath];
OSStatus result = AudioFileOpenURL((CFURLRef)afUrl, kAudioFileReadPermission, kAudioFileCAFType, &outAFID);
if (result != 0) NSLog(@"cannot openf file: %@",filePath);
If I put NSLogs in between every line in that function they print fine, but any after the function is called don't work. Is there anything wrong with the code i posted or is there some other problem in my program?