iOS Audioqueuestart returns-50 recording failure issue
When using iOS recording, this problem may occur if there is a voice operation elsewhere in the app;
Cause the Recorder to open failed! Cannot record, and
Audioqueuestart () returned the error code-50
How to Solve
Call the following code before calling the Audioqueuestart () method
Avaudiosession * session = [avaudiosession sharedinstance]; if (!session) printf ("ERROR INITIALIZING AUDIO session! \ n "); else{ nserror *nserror = nil; [Session Setcategory:avaudiosessioncategoryplayandrecord error:&nserror]; if (nserror) printf ("couldn ' t set audio category!"); [Session Setactive:yes error:&nserror]; if (nserror) printf ("Audiosession setActive = YES failed"); }
Reference: HTTP://STACKOVERFLOW.COM/QUESTIONS/12650263/AUDIO-QUEUE-AUDIOQUEUESTART-RETURNS-50
iOS Audioqueuestart returns-50 recording failure issue