lukeweber / webrtc-jingle-client

Webrtc audio + jingle protocol brought to IOS and Android.
https://groups.google.com/forum/?fromgroups#!forum/webrtc-jingle
BSD 3-Clause "New" or "Revised" License
334 stars 137 forks source link

OpenSLES audio grabbing #100

Open bic-user opened 11 years ago

bic-user commented 11 years ago

How I should configure webrtc to use OpenSLES for audio grabbing? Is it actually supported?

lukeweber commented 11 years ago

Opensles previously has had spotty performance in my testing. On newer versions of android it's supposed to be better, but they basically broke the driver. I know csip uses opensles on android and have their own driver, which I assume doesn't suck and they switch between that and java method, depending on phone model and api version. I did make the partial improvements to have both loaded in code, to ideally switch between the two so I could do more testing, but only got as far as the define (WEBRTC_ANDROID_OPENSLES) that's used in here: https://github.com/lukeweber/webrtc-src-override/blob/master/modules/audio_device/audio_device_impl.cc, but you could extend this pretty easily to switch between one or the other depending on device or some other params.

The reverse of this would be how you enable the opensles driver on android. https://github.com/lukeweber/webrtc-src-override/commit/a0b1421a6b54b6f9ec00e3da279d3be3df804c77

https://code.google.com/p/webrtc/issues/detail?id=1119 was my previous issue when they fully broke it, but it's marked as wontfix, so it's hard to say when they'll get to it.