Getting Audio Recording Error

60 views
Skip to first unread message

Phil

unread,
Jun 4, 2019, 7:11:21 AM6/4/19
to discuss-webrtc
Hi,

I'm using Webrt in android application. Some time i'm getting the following error after the ice connection state success.

 WebRtcAudioRecordExternal: Start recording error: AUDIO_RECORD_START_STATE_MISMATCH. AudioRecord.startRecording failed - incorrect state :1

It happens randomly. There is no active recording is running in my device

I'm using the latest webrts library(M73)

Please help anyone.

Thanks in Advance.

Phil

Danilo

unread,
Jul 19, 2021, 6:00:12 AMJul 19
to discuss-webrtc
We're also getting this error occasionally in user reports. Here's the full log:

> WebRtcAudioRecordExternal: Potential microphone conflict. Active sessions: 1
> WebRtcAudioRecordExternal: Start recording error: AUDIO_RECORD_START_STATE_MISMATCH. AudioRecord.startRecording failed - incorrect state: 1
> audio_record_jni.cc(line 148): StartRecording failed

From looking at the WebRTC source code, most probably the recording session could not be started because the microphone resource was locked.

Is there a way to detect this issue, so that the call can be aborted with an appropriate error message? Having one-way-audio is very bad UX. The methods in question all seem to get called indirectly by the native code, so there would need to be some kind of error reported. Alternatively, maybe there's some kind of status flag I could poll initially to ensure that microphone access worked?

Best regards,
Danilo
Reply all
Reply to author
Forward
0 new messages