ios - Audio recording won't work after incoming call -


I am trying to record voice from the microphone and later it runs on the speaker. I use this code to complete

  [[Avidio session sharing] Set Category: AVAudioSessionCategoryPlayAndRecord Error: Zero]; [[Avidio Session Shared Instance] Override OutputAudio Port: Aviadisonation PortOperide Speaker Error: Zero]; [[Avidio Session Shared Instance] set active: yes error: zero];   

This works fine, but if incoming calls are received (when the app is active), after the call is finished and the app resumes, the microphone input is no longer come to know.

I tried to handle - (zero) applicationDebackActive: (UIApplication *) application and Reset AVAudio session, but it will not work. Do I have to stop the AVIDOrcorder when the app is inactive, and records are recorded?

Am I doing something wrong or IOS bug? I'm running on iOS 7. Thank you

You are right that you once the call is received, the aviado recorder And once it's over, start it again. However, you do not do this in applicationDidBecomeActive: , instead you need to implement the AVAudioSession delegates, and more specifically audioRecorderBeginInterruption: and audioRecorderEndInterruption: . See also how to implement these representatives I will also see that your problem should be solved.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -