views:

22

answers:

1

NSString recordFile = [NSTemporaryDirectory() stringByAppendingPathComponent: (NSString)inRecordFile];
NSArray *docPaths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString docDir=[[docPaths objectAtIndex:0]stringByAppendingPathComponent: (NSString)inRecordFile];

    url = CFURLCreateWithString(kCFAllocatorDefault, (CFStringRef)docPaths, NULL);

    // create the audio file
    XThrowIfError(AudioFileCreateWithURL(url, kAudioFileCAFType, &mRecordFormat, kAudioFileFlags_EraseFile,
                                      &mRecordFile), "AudioFileCreateWithURL failed");
    CFRelease(url);
A: 

NSString docDir=[[docPaths objectAtIndex:0]stringByAppendingPathComponent: (NSString)inRecordFile];

change docDir to *docDir :)

it's not working...
rkloves