I just received a result code(-50) returned from ExtAudioFileWrite().
And I didnt't find the information about this result code in "Extended Audio File Services Reference".
Please help me to resolve it.
Thanks.
I just received a result code(-50) returned from ExtAudioFileWrite().
And I didnt't find the information about this result code in "Extended Audio File Services Reference".
Please help me to resolve it.
Thanks.
This error code is declared in MacErrors.h of the CarbonCore framework. -50 is paramErr
. IOW, one of your parameters is invalid. So you will need to verify your parameters, buffer sizes, arguments that you pass and so on to locate the parameter which has been flagged.
Add the code to the initialization of project
NSArray *availableInputs = [[AVAudioSession sharedInstance] availableInputs];
AVAudioSessionPortDescription *port = [availableInputs objectAtIndex:0]; //built in mic for your case
NSError *portErr = nil;
[[AVAudioSession sharedInstance] setPreferredInput:port error:&portErr];
errSecParam = -50, /* One or more parameters passed to a function were not valid. */
you can find all error in Security->SecBase.h