Re: Android audio device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hej Lasse

I experienced the Open-SLES issue a couple of years ago. Basically some devices froze when shutting down the sound card. I would assume it is long since fixed but we keep using the JNI driver anyway. If I recall correctly I also did some latency measurements and could not notice a difference. I also recall some devices having issues using other sound card frequencies than 16kHZ.

One thing to keep in mind is that at least in the past, the OpenSL-ES driver did not have any audio processing such as echo cancellation or noise reduction. This you get automatically when using the Java API: https://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html#VOICE_COMMUNICATION

Nowadays pjsip has integrated the webrtc ec so it might be less of an issue but it might be worth taking into account.

I have honestly not spent much time on this since 2013 so some comments might be a bit dated but given the longtail of Android some it it probably still valid. If anyone has more recent comments it would be interesting to know. 

Johan



From: pjsip on behalf of Lars Olsson
Reply-To: pjsip list
Date: Saturday, 29 October 2016 at 01:23
To: "pjsip@xxxxxxxxxxxxxxx"
Subject: [pjsip] Android audio device

Hi,

What is the recommended audio device for Android to use with PJSIP?
JNI or OpenSL?

I can read in the getting started guide that there might be some shutdown issues with OpenSL? Linked to a Kitkat issue.

Running on latest TRUNK I have multiple sound issues using JNI on some old low budget devices LG running.  One will not record anything from the mic (4.4.2) and on the other device (4.0.3) I get a periodic "tick" sound.  
I will dig deeper into if I can find any specific reason for this. On other devices, JNI driver works mostly fine.

Running with OpenSL audio device, I get working audio on both struggling devices.

Which audio device are people using?
Any known drawbacks to use either option?
Safe to use OpenSL?

Cheers,
Lasse


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux