Commit Graph

7 Commits

Author SHA1 Message Date
e71b24e421 OpenSL ES stability improvements.
This CL does two things:

1) Improves stability in the existing OpenSL ES implementation for devices that
supports OpenSL ES. The cost is a slight increase in latency since the focus here
has been on avoiding audio glitches.

2) Adds a new Java API to exclude usage of OpenSL ES to enable comparisons between
OpenSL ES and Java based audio backends.

BUG=b/22452539

Review URL: https://codereview.webrtc.org/1440623002

Cr-Commit-Position: refs/heads/master@{#10618}
2015-11-12 09:48:36 +00:00
1ba936a807 Revert of Fix for "Android audio playout doesn't support non-call media stream" (patchset #3 id:40001 of https://codereview.webrtc.org/1419693004/ )
Reason for revert:
Causes issues on some phones, e.g. Sony mobiles.
See b/25385046 for details.

Original issue's description:
> Fix for "Android audio playout doesn't support non-call media stream"
>
> BUG=webrtc:4767
> R=magjed@webrtc.org
>
> Committed: https://crrev.com/6408174cdc4040528dd87ff7e5c76be91cdbafbe
> Cr-Commit-Position: refs/heads/master@{#10435}

TBR=magjed@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4767

Review URL: https://codereview.webrtc.org/1415603008

Cr-Commit-Position: refs/heads/master@{#10492}
2015-11-03 12:28:03 +00:00
6408174cdc Fix for "Android audio playout doesn't support non-call media stream"
BUG=webrtc:4767
R=magjed@webrtc.org

Review URL: https://codereview.webrtc.org/1419693004 .

Cr-Commit-Position: refs/heads/master@{#10435}
2015-10-28 12:06:24 +00:00
91d6edef35 Add RTC_ prefix to (D)CHECKs and related macros.
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.

Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.

BUG=chromium:468375
NOTRY=true

Review URL: https://codereview.webrtc.org/1335923002

Cr-Commit-Position: refs/heads/master@{#9964}
2015-09-17 07:24:51 +00:00
86d907cffd Refactor the AudioDevice for iOS and improve the performance and stability
This CL contains major modifications of the audio output parts for WebRTC on iOS:
- general code cleanup
- improves thread handling (added thread checks, remove critical section, atomic ops etc.)
- reduces loopback latency of iPhone 6 from ~90ms to ~60ms ;-)
- improves selection of audio parameters on iOS
- reduces complexity by removing complex and redundant delay estimates
- now instead uses fixed delay estimates if for some reason the SW EAC must be used
- adds AudioFineBuffer to compensate for differences in native output buffer size and
  the 10ms size used by WebRTC. Same class as is used today on Android and we have unit tests for
  this class (the old code was buggy and we have several issue reports of crashes related to it)

Similar improvements will be done for the recording sid as well in a separate CL.
I will also add support for 48kHz in an upcoming CL since that will improve Opus performance.

BUG=webrtc:4796,webrtc:4817,webrtc:4954, webrtc:4212
TEST=AppRTC demo and iOS modules_unittests using --gtest_filter=AudioDevice*
R=pbos@webrtc.org, tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1254883002 .

Cr-Commit-Position: refs/heads/master@{#9875}
2015-09-07 14:10:10 +00:00
1380e266ff Convert some more things to size_t.
These changes stem from requests by Andrew on https://codereview.webrtc.org/1228823002/ to eliminate some "return -1"s and change to using asserts plus returning size_ts.  I then also converted the relevant connected bits.

This also cleans up a bunch of style issues, e.g. no spaces around operators.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, henrik.lundin@webrtc.org, niklas.enbom@webrtc.org

Review URL: https://codereview.webrtc.org/1305983003 .

Cr-Commit-Position: refs/heads/master@{#9813}
2015-08-29 00:31:15 +00:00
b26198972c Adding support for OpenSL ES output in native WebRTC
BUG=4573,2982,2175,3590
TEST=modules_unittests --gtest_filter=AudioDevice*, AppRTCDemo and WebRTCDemo

Summary:

- Removes dependency of the 'enable_android_opensl' compiler flag.
  Instead, OpenSL ES is always supported, and will enabled for devices that
  supports low-latency output.
- WebRTC no longer supports OpenSL ES for the input/recording side.
- Removes old code and demos using OpenSL ES for audio input.
- Improves accuracy of total delay estimates (better AEC performance).
- Reduces roundtrip audio latency; especially when OpenSL can be used.

Performance verified on: Nexus 5, 6, 7 and 9. Samsung Galaxy S4 and S6.
Android One device.

R=magjed@webrtc.org, phoglund@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51759004

Cr-Commit-Position: refs/heads/master@{#9208}
2015-05-18 14:49:04 +00:00