how to save Audiorecorded file to another location? i m trying but i got exception...

Posted by rakesh-bhatt99 on Stack Overflow See other posts from Stack Overflow or by rakesh-bhatt99
Published on 2010-06-09T06:11:23Z Indexed on 2010/06/09 6:12 UTC
Read the original article Hit count: 155

Filed under:
|

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);

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about audio-recording