Audio Recording Failure in Webrtc Android

1,023 views
Skip to first unread message

Phil

unread,
Feb 15, 2019, 9:23:51 AM2/15/19
to discuss-webrtc
Hi guys,

I'm getting the following error in my Audio call in android.

E/AudioRecord: start() status -38
E/org.webrtc.Logging: WebRtcAudioRecord: Start recording error: AUDIO_RECORD_START_STATE_MISMATCH. AudioRecord.startRecording failed - incorrect state :1
E/AudioRecordJni: StartRecording failed!

How to overcome this issue. I'm using webrtc M62 build.

Please help me. 
Thanks in Advance.


Regards,
Phil

Henrik Andreasson

unread,
Feb 15, 2019, 9:32:32 AM2/15/19
to discuss-webrtc
First of all you are on a very old version and should update to latest (M73).
The described issue can happen (but it should be a very rare event) on some devices when there is some sort of microphone issue:
conflict with other app, old call not properly closed, etc. and usually a fresh start will resolve the problem.
If the issue happens always, file a bug and add more details.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/066a1776-6a2a-451b-985f-b1002dbe9e98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phil

unread,
Feb 18, 2019, 2:32:52 AM2/18/19
to discuss-webrtc
Hi,
I'm using multiple peerconnection in my project in same time. Does that make any problem in this case? And I'm calling peerconnection.release() and peerconnectionfactory.release() properly. should I need to release any thing related to audio stream. plz help.


Regards,
Phil.

Henrik Andreasson

unread,
Feb 18, 2019, 6:43:41 AM2/18/19
to discuss-webrtc
Each PC creates/contains one ADM and most likely that is the problem in your case.
Hence, ADM1 is active when ADM2 want's to start recording. You can only have one active PC/ADM in WebRTC on Android.
Analyzing logcat outputs will probably show exactly what happens but the general solution is to ensure that only one ADM is active.

Message has been deleted

Henrik Andreasson

unread,
Feb 18, 2019, 10:20:34 AM2/18/19
to discuss-webrtc
If none is injected externally by the user, a default ADM is created as part of each PC here:


I assume you do this twice in your example and that will fail on Android.

On Mon, Feb 18, 2019 at 4:07 PM Phil <ayyapp...@gmail.com> wrote:
Hi Henrik,

Thank you for the answer.
 Could you please tell what is ADM in this case?. I'm not externally creating that one.

Regards,
Ayyappan N
Message has been deleted

Phil

unread,
Feb 18, 2019, 10:24:27 AM2/18/19
to discuss-webrtc
Thank you Henrik.


Sorry for accident deletion of above message.
Reply all
Reply to author
Forward
0 new messages