Hello All,
I have to convert an audio file from one from to another in iPhone. I found that we have afconvert in apple developer's example. I tried to use it in my iPhone App. I created a sample application having the files that afconvert uses in /Developer/Example/CoreAudio/Serives/AudioFileTools. But it gives me exec-bad-access when i execute the ExtAudioFileOpenURL api.
I have my input file names "test.mp3" in app's document folder.
Following is the code snippet..
NSArray * arr = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask,
YES
);
NSString *str = [arr objectAtIndex:0];
NSString *str1 = [NSString stringWithFormat"%@/test.mp3", str];
//NSLog(@"%@", str1);
ExtAudioFileRef file = NULL;
CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)str1, kCFURLPOSIXPathStyle, FALSE);
ExtAudioFileOpenURL(url, &file);
//release the allocated resource
I received "EXC_BAD_ACCESS" in ExtAudioFileOpenURL...
Can anybody please help me.. Please..
Thanks in an advance.
sameera
I have to convert an audio file from one from to another in iPhone. I found that we have afconvert in apple developer's example. I tried to use it in my iPhone App. I created a sample application having the files that afconvert uses in /Developer/Example/CoreAudio/Serives/AudioFileTools. But it gives me exec-bad-access when i execute the ExtAudioFileOpenURL api.
I have my input file names "test.mp3" in app's document folder.
Following is the code snippet..
NSArray * arr = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask,
YES
);
NSString *str = [arr objectAtIndex:0];
NSString *str1 = [NSString stringWithFormat"%@/test.mp3", str];
//NSLog(@"%@", str1);
ExtAudioFileRef file = NULL;
CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)str1, kCFURLPOSIXPathStyle, FALSE);
ExtAudioFileOpenURL(url, &file);
//release the allocated resource
I received "EXC_BAD_ACCESS" in ExtAudioFileOpenURL...
Can anybody please help me.. Please..
Thanks in an advance.
sameera