It looks like AVAudioRecorder processing will stop (isRecording becomes false) if another application starts playing music.
Is there a way to avoid that? (by tweaking the current code or using another API? I am not sure another API returns metering information/averagePowerForChannel).
Making the timer collection more robust
When the application resumes after the previous problem, the metering processing should resume too (isRecording should become true again).
I am unsure about the right fix (hence no PR :)) but I considered something like:
(void)sendProgressUpdate {
if (!_audioRecorder || !_audioRecorder.isRecording) {
if (!_audioRecorder.isRecording) {
// Restart the timer if the recording stopped for some reason
[self stop];
[self start:_progressUpdateInterval];
}
return;
}
(...)
Hi, I have two questions/comments on iOS:
Conflicts between AVAudio callers
It looks like AVAudioRecorder processing will stop (isRecording becomes false) if another application starts playing music.
Is there a way to avoid that? (by tweaking the current code or using another API? I am not sure another API returns metering information/averagePowerForChannel).
Making the timer collection more robust
When the application resumes after the previous problem, the metering processing should resume too (isRecording should become true again).
I am unsure about the right fix (hence no PR :)) but I considered something like:
What do you think?