We have application using PTT Framework to record audio messages when app is backgrounded. Right now we are using AVAudioRecorder for that purpose. And problem is one specific user has frequent issue - recorded audio contains only silence. I've checked almost everything I can imagine but didn't find any possible reason of issue.
Conditions:
- AVAudioRecorder uses following configuration:
[ AVEncoderAudioQualityKey: AVAudioQuality.low.rawValue, AVFormatIDKey : kAudioFormatMPEG4AAC, AVNumberOfChannelsKey: 1, AVSampleRateKey: 16000.0 ]
- App waits both
didBeginTransmittinganddidActivate audioSessionfromPTChannelManager(audio session hasplaybackcategory at that moment) - App does
AVAudioSessioncategory change toplayAndRecord - App gets
routeChangeNotificationwithcategoryChangeand category =playAndRecord - There is no any interruption notifications from
AVAudioSessionduring recording - There is no any error notification from
AVAudioRecorder
Any idea what exactly I do wrong? Is there anything else I should check?
Thanks in advance.
P.S. it looks like recording audio with AudioUnit has the same issue, but let's exclude it from question atm for simplicity.