I am trying to get example code paired with Cocoa's interface (it was written using Carbon); however, when I tried to replace
err = ExtAudioFileCreateNew(&inParentDirectory, inFileName, kAudioFileM4AType, inASBD, NULL, &fOutputAudioFile);
with
err = ExtAudioFileCreateWithURL(CFURLCreateWithString(NULL,(CFStringRef)inFileName,NULL),kAudioFileM4AType,inASBD, NULL,kAudioFileFlags_EraseFile, &fOutputAudioFile);
I started getting these exceptions
2011-09-25 10: 27: 31.701 tester [1120: a0f] - [NSURL length]: unrecognized selector sent to instance 0x1001c0360 2011-09-25 10: 27: 31.701 tester [1120: a0f] - [NSURL length]: unrecognized selector sent to instance 0x1001c0360.
I examined several other questions and answers, and in all these cases the problem was with the transfer NSURLwhen expected NSString; however, I cannot find where / if I do this. I looked through the documentation and, as far as I can tell, with very limited knowledge of the Apple API. I am not doing anything bad.
Any help would be greatly appreciated.
source
share