I'm using CDSoundEngine to record sounds and save them in the users /Documents/ directory. It works fine...if I go to the iPad simulator's library the sounds are there...
My problem is that they do not play. It plays if I copy the soundfile to the project.
What am I missing?
-(void) playRecording {
//alternative approach
//NSString *filePath = [NSURL fileURLWithPath: recorderFilePath];
NSURL *url = [NSURL fileURLWithPath: recorderFilePath];
NSString *filePath = [url absoluteString];
CCLOG(@"Playing the recorded audio ... %@",filePath); //correctly displays the path (with %20 for spaces) to /Documents/recording.caf
CDSoundEngine *sse = [[CDAudioManager sharedManager] soundEngine];
//[sse loadBuffer:1 filePath:@"recording.caf"]; //this works if the file is added to the main project
[sse loadBuffer:1 filePath:filePath]; //this does not work
//[sse loadBuffer:1 filePath:@"filePath"]; //this does not work
[sse playSound:1 sourceGroupId: 0 pitch: 2.0f pan: 0.0f gain: 1.0f loop: NO];
}